aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu.Yadi <[email protected]>2024-01-11 19:32:29 +0800
committerChristian Brauner <[email protected]>2024-01-22 15:33:37 +0100
commit9e3f1c59367515e7e40675fe83645a131c05039d (patch)
tree0e19d81ec554e4b10839e871deb25eb9620cab09
parent0f05ee447949cf1b72bd7c415c803ea7f7209403 (diff)
selftests/move_mount_set_group:Make tests build with old libc
Replace SYS_<syscall> with __NR_<syscall>. Using the __NR_<syscall> notation, provided by UAPI, is useful to build tests on systems without the SYS_<syscall> definitions. Replace SYS_move_mount with __NR_move_mount Similar changes: commit 87129ef13603 ("selftests/landlock: Make tests build with old libc") Acked-by: Mickaël Salaün <[email protected]> Signed-off-by: Hu.Yadi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Berlin <[email protected]> Suggested-by: Jiao <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r--tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
index 50ed5d475dd1..bcf51d785a37 100644
--- a/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
+++ b/tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
@@ -218,7 +218,7 @@ static bool move_mount_set_group_supported(void)
if (mount(NULL, SET_GROUP_FROM, NULL, MS_SHARED, 0))
return -1;
- ret = syscall(SYS_move_mount, AT_FDCWD, SET_GROUP_FROM,
+ ret = syscall(__NR_move_mount, AT_FDCWD, SET_GROUP_FROM,
AT_FDCWD, SET_GROUP_TO, MOVE_MOUNT_SET_GROUP);
umount2("/tmp", MNT_DETACH);
@@ -363,7 +363,7 @@ TEST_F(move_mount_set_group, complex_sharing_copying)
CLONE_VM | CLONE_FILES); ASSERT_GT(pid, 0);
ASSERT_EQ(wait_for_pid(pid), 0);
- ASSERT_EQ(syscall(SYS_move_mount, ca_from.mntfd, "",
+ ASSERT_EQ(syscall(__NR_move_mount, ca_from.mntfd, "",
ca_to.mntfd, "", MOVE_MOUNT_SET_GROUP
| MOVE_MOUNT_F_EMPTY_PATH | MOVE_MOUNT_T_EMPTY_PATH),
0);