Skip to content

Commit

Permalink
Test openat(2) instead of open(2) since it exists on AArch64.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Nov 2, 2024
1 parent 13541ec commit 0154631
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,8 @@ set(BASIC_TESTS
numa
x86/old_fork
orphan_process
open_null
openat2
openat_null
packet_mmap_disable
x86/patch_syscall_restart
pause
Expand Down
4 changes: 2 additions & 2 deletions src/test/open_null.c → src/test/openat_null.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include <unistd.h>

int main(void) {
// Use syscall(2) because the glibc prototype for open(2) might enforce that
// Use syscall(2) because the glibc prototype for openat(2) might enforce that
// it's nonnull.
int fd = syscall(SYS_open, NULL, O_RDONLY);
int fd = syscall(SYS_openat, AT_FDCWD, NULL, O_RDONLY);
test_assert(fd == -1);
atomic_puts("EXIT-SUCCESS");
return 0;
Expand Down

0 comments on commit 0154631

Please sign in to comment.