diff --git a/test/libc/calls/fexecve_test.c b/test/libc/calls/fexecve_test.c index ea51c8159..aab041724 100644 --- a/test/libc/calls/fexecve_test.c +++ b/test/libc/calls/fexecve_test.c @@ -27,6 +27,8 @@ #include "libc/testlib/testlib.h" // clang-format off +STATIC_YOINK("zip_uri_support"); + int fds[2]; char buf[8]; char testlib_enable_tmp_setup_teardown; @@ -97,3 +99,12 @@ TEST(fexecve, APE) { fexecve(fd, (char *const[]){0}, (char *const[]){0}); EXITS(42); } + +TEST(fexecve, zipos) { + if (!IsLinux()) return; + int fd = open("/zip/life.elf", O_RDONLY); + SPAWN(vfork); + if (fd == -1 && errno == ENOSYS) _Exit(42); + fexecve(fd, (char *const[]){0}, (char *const[]){0}); + EXITS(42); +} diff --git a/test/libc/calls/test.mk b/test/libc/calls/test.mk index 46e9e36ee..ccf9f903e 100644 --- a/test/libc/calls/test.mk +++ b/test/libc/calls/test.mk @@ -92,6 +92,7 @@ o/$(MODE)/test/libc/calls/fexecve_test.com.dbg: \ $(TEST_LIBC_CALLS_DEPS) \ o/$(MODE)/test/libc/calls/fexecve_test.o \ o/$(MODE)/test/libc/calls/calls.pkg \ + o/$(MODE)/test/libc/mem/prog/life.elf.zip.o \ o/$(MODE)/tool/build/echo.zip.o \ o/$(MODE)/test/libc/calls/life-nomod.com.zip.o \ $(LIBC_TESTMAIN) \