mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 10:50:28 +00:00
zipos fexecve now works
This commit is contained in:
parent
c395d16230
commit
4fd1fae5ca
2 changed files with 12 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue