diff --git a/src/syscalls.py b/src/syscalls.py index 4b13178630f..2c123a9a3d0 100644 --- a/src/syscalls.py +++ b/src/syscalls.py @@ -1744,7 +1744,7 @@ def __init__(self, **kwargs): futex_waitv = UnsupportedSyscall(all=449) set_mempolicy_home_node = UnsupportedSyscall(all=450) cachestat = UnsupportedSyscall(all=451) -fchmodat2 = UnsupportedSyscall(all=452) +fchmodat2 = EmulatedSyscall(all=452) map_shadow_stack = UnsupportedSyscall(all=453) futex_wake = UnsupportedSyscall(all=454) futex_wait = UnsupportedSyscall(all=455) diff --git a/src/test/chmod.c b/src/test/chmod.c index 4332c6f2847..f42b8676a05 100644 --- a/src/test/chmod.c +++ b/src/test/chmod.c @@ -11,12 +11,11 @@ int main(void) { test_assert(0 == access(file_path, R_OK)); test_assert(0 == fchmod(fd, 0200)); test_assert(0 == access(file_path, W_OK)); - test_assert(0 == fchmodat(AT_FDCWD, file_path, 0400, 0)); + test_assert(0 == syscall(RR_fchmodat, AT_FDCWD, file_path, 0400)); + test_assert(0 == syscall(RR_fchmodat2, AT_FDCWD, file_path, 0400, 0 || errno == ENOSYS)); test_assert(0 == access(file_path, R_OK)); test_assert(0 == faccessat(AT_FDCWD, file_path, R_OK, AT_SYMLINK_NOFOLLOW) || errno == ENOSYS); -#ifdef SYS_faccessat2 - test_assert(0 == syscall(SYS_faccessat2, AT_FDCWD, file_path, R_OK, AT_SYMLINK_NOFOLLOW) || errno == ENOSYS); -#endif + test_assert(0 == syscall(RR_faccessat2, AT_FDCWD, file_path, R_OK, AT_SYMLINK_NOFOLLOW) || errno == ENOSYS); atomic_puts("EXIT-SUCCESS"); return 0;