From 6b638e9d2e3d42dc203129a4c855bf6709797392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sun, 17 Dec 2023 14:27:36 +0000 Subject: [PATCH] Better check, better comment, TODO --- test/libc/calls/getprogramexecutablename_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/libc/calls/getprogramexecutablename_test.c b/test/libc/calls/getprogramexecutablename_test.c index 3e1f8ad8d..0de855239 100644 --- a/test/libc/calls/getprogramexecutablename_test.c +++ b/test/libc/calls/getprogramexecutablename_test.c @@ -36,8 +36,12 @@ void SetUpOnce(void) { __attribute__((__constructor__)) static void Child(int argc, char *argv[]) { static bool skiparg0tests; - if (IsLinux()) { - /* see also: https://github.com/jart/cosmopolitan/issues/1014 */ + if (!IsXnuSilicon()) { + /* TODO(mrdomino): these tests only pass on XnuSilicon right now because + __sys_execve fails there, so the ape loader is used. + the correct check here is "we have been invoked either + as an assimilated binary or via the ape loader, and not + via a raw __sys_execve." */ skiparg0tests = true; if (argc < 2) { fprintf(stderr, "warning: skipping argv[0] tests\n");