mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +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
|
@ -74,7 +74,7 @@ TEST(execve, ziposELF) {
|
|||
}
|
||||
|
||||
TEST(execve, ziposAPE) {
|
||||
if (!IsLinux()) {
|
||||
if (!IsLinux() && !IsFreebsd()) {
|
||||
EXPECT_EQ(-1, execve("/zip/life-nomod.com", (char *const[]){0},
|
||||
(char *const[]){0}));
|
||||
return;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -131,6 +131,9 @@ o/$(MODE)/test/libc/calls/openbsd_test.com.runs: \
|
|||
o/$(MODE)/test/libc/calls/fexecve_test.com.runs: \
|
||||
private .UNSANDBOXED = 1 # for memfd_create()
|
||||
|
||||
o/$(MODE)/test/libc/calls/execve_test.com.runs: \
|
||||
private .UNSANDBOXED = 1 # for memfd_create()
|
||||
|
||||
o/$(MODE)/test/libc/calls/read_test.com.runs: \
|
||||
private .UNVEIL += /dev/zero
|
||||
|
||||
|
|
Loading…
Reference in a new issue