selftests/mount_settattr: remove duplicate syscall definitions
authorAmir Goldstein <amir73il@gmail.com>
Fri, 9 May 2025 13:32:36 +0000 (15:32 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 12 May 2025 09:40:12 +0000 (11:40 +0200)
Which are already defined in wrappers.h.

For now, the syscall defintions of mount_settattr() itself
remain in the test, which is the only test to use them.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250509133240.529330-5-amir73il@gmail.com
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/mount_setattr/mount_setattr_test.c

index 9e933925b3c2ff5e58a1b2f0d1605eca4db34a1d..8b378c91debf5ceda8b84f03ebb9b832327e42db 100644 (file)
        #endif
 #endif
 
-#ifndef __NR_open_tree
-       #if defined __alpha__
-               #define __NR_open_tree 538
-       #elif defined _MIPS_SIM
-               #if _MIPS_SIM == _MIPS_SIM_ABI32        /* o32 */
-                       #define __NR_open_tree 4428
-               #endif
-               #if _MIPS_SIM == _MIPS_SIM_NABI32       /* n32 */
-                       #define __NR_open_tree 6428
-               #endif
-               #if _MIPS_SIM == _MIPS_SIM_ABI64        /* n64 */
-                       #define __NR_open_tree 5428
-               #endif
-       #elif defined __ia64__
-               #define __NR_open_tree (428 + 1024)
-       #else
-               #define __NR_open_tree 428
-       #endif
-#endif
-
-#ifndef __NR_move_mount
-       #if defined __alpha__
-               #define __NR_move_mount 539
-       #elif defined _MIPS_SIM
-               #if _MIPS_SIM == _MIPS_SIM_ABI32        /* o32 */
-                       #define __NR_move_mount 4429
-               #endif
-               #if _MIPS_SIM == _MIPS_SIM_NABI32       /* n32 */
-                       #define __NR_move_mount 6429
-               #endif
-               #if _MIPS_SIM == _MIPS_SIM_ABI64        /* n64 */
-                       #define __NR_move_mount 5429
-               #endif
-       #elif defined __ia64__
-               #define __NR_move_mount (428 + 1024)
-       #else
-               #define __NR_move_mount 429
-       #endif
-#endif
-
 #ifndef MOUNT_ATTR_IDMAP
 #define MOUNT_ATTR_IDMAP 0x00100000
 #endif
@@ -161,18 +121,6 @@ static inline int sys_mount_setattr(int dfd, const char *path, unsigned int flag
        return syscall(__NR_mount_setattr, dfd, path, flags, attr, size);
 }
 
-#ifndef OPEN_TREE_CLONE
-#define OPEN_TREE_CLONE 1
-#endif
-
-#ifndef OPEN_TREE_CLOEXEC
-#define OPEN_TREE_CLOEXEC O_CLOEXEC
-#endif
-
-#ifndef AT_RECURSIVE
-#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
-#endif
-
 static ssize_t write_nointr(int fd, const void *buf, size_t count)
 {
        ssize_t ret;