mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 14:22:28 +00:00
execve_test.com: fix run with landlock make. Cleanup execve/fexecve tests (#755)
This commit is contained in:
parent
ae365928c5
commit
f5520209f5
3 changed files with 6 additions and 6 deletions
|
@ -95,7 +95,6 @@ TEST(fexecve, APE) {
|
|||
SPAWN(fork);
|
||||
int fd = open("life-nomod.com", O_RDONLY);
|
||||
ASSERT_NE(-1, fd);
|
||||
if (fd == -1 && errno == ENOSYS) _Exit(42);
|
||||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
}
|
||||
|
@ -106,7 +105,6 @@ TEST(fexecve, APE_cloexec) {
|
|||
SPAWN(fork);
|
||||
int fd = open("life-nomod.com", O_RDONLY | O_CLOEXEC);
|
||||
ASSERT_NE(-1, fd);
|
||||
if (fd == -1 && errno == ENOSYS) _Exit(42);
|
||||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
}
|
||||
|
@ -114,8 +112,8 @@ TEST(fexecve, APE_cloexec) {
|
|||
TEST(fexecve, zipos) {
|
||||
if (!IsLinux() && !IsFreebsd()) return;
|
||||
int fd = open("/zip/life.elf", O_RDONLY);
|
||||
ASSERT_NE(-1, fd);
|
||||
SPAWN(fork);
|
||||
if (fd == -1 && errno == ENOSYS) _Exit(42);
|
||||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
close(fd);
|
||||
|
@ -124,9 +122,8 @@ TEST(fexecve, zipos) {
|
|||
TEST(fexecve, ziposAPE) {
|
||||
if (!IsLinux() && !IsFreebsd()) return;
|
||||
int fd = open("/zip/life-nomod.com", O_RDONLY);
|
||||
SPAWN(fork);
|
||||
ASSERT_NE(-1, fd);
|
||||
if (fd == -1 && errno == ENOSYS) _Exit(42);
|
||||
SPAWN(fork);
|
||||
fexecve(fd, (char *const[]){0}, (char *const[]){0});
|
||||
EXITS(42);
|
||||
close(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue