diff options
author | Christian Brauner <brauner@kernel.org> | 2025-04-09 12:57:57 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-05-12 11:40:08 +0200 |
commit | 7a012a692e7cfbca245d195a80f23634d3d74fcc (patch) | |
tree | 4b6cff6019fe067400f6752655e62ae76f305b6b | |
parent | 2680acd336412b5e8c34c64377e78d85e92739c9 (diff) |
selftests/mount_settattr: add missing STATX_MNT_ID_UNIQUE define
CC mount_setattr_test
In file included from mount_setattr_test.c:24:
mount_setattr_test.c: In function ‘mount_setattr_mount_detached_mount_on_detached_mount_and_attach’:
mount_setattr_test.c:1850:60: error: ‘STATX_MNT_ID_UNIQUE’ undeclared (first use in this function); did you mean ‘STATX_MNT_ID’?
1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0);
| ^~~~~~~~~~~~~~~~~~~
../kselftest_harness.h:757:20: note: in definition of macro ‘__EXPECT’
757 | __typeof__(_expected) __exp = (_expected); \
| ^~~~~~~~~
mount_setattr_test.c:1850:9: note: in expansion of macro ‘ASSERT_EQ’
1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0);
| ^~~~~~~~~
mount_setattr_test.c:1850:60: note: each undeclared identifier is reported only once for each function it appears in
1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0);
| ^~~~~~~~~~~~~~~~~~~
../kselftest_harness.h:757:20: note: in definition of macro ‘__EXPECT’
757 | __typeof__(_expected) __exp = (_expected); \
| ^~~~~~~~~
mount_setattr_test.c:1850:9: note: in expansion of macro ‘ASSERT_EQ’
1850 | ASSERT_EQ(statx(fd_tree_subdir, "", AT_EMPTY_PATH, STATX_MNT_ID_UNIQUE, &stx), 0);
| ^~~~~~~~~
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | tools/testing/selftests/filesystems/overlayfs/wrappers.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/filesystems/overlayfs/wrappers.h b/tools/testing/selftests/filesystems/overlayfs/wrappers.h index c38bc48e0cfa..b9b090ef47b4 100644 --- a/tools/testing/selftests/filesystems/overlayfs/wrappers.h +++ b/tools/testing/selftests/filesystems/overlayfs/wrappers.h @@ -9,6 +9,10 @@ #include <linux/mount.h> #include <sys/syscall.h> +#ifndef STATX_MNT_ID_UNIQUE +#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */ +#endif + static inline int sys_fsopen(const char *fsname, unsigned int flags) { return syscall(__NR_fsopen, fsname, flags); |