summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/filesystems/open_tree_ns
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-01-22 11:48:50 +0100
committerChristian Brauner <brauner@kernel.org>2026-03-12 13:33:54 +0100
commitbe1ca3ee8f97067fee87fda73ea5959d5ab75bbf (patch)
tree6b8b878ac3e45c3e1672c386c69bad24ade8705f /tools/testing/selftests/filesystems/open_tree_ns
parentfc1a05de0058bc1dbbc202f6f6cdb25ee0bae16d (diff)
downloadlinux-be1ca3ee8f97067fee87fda73ea5959d5ab75bbf.tar.gz
linux-be1ca3ee8f97067fee87fda73ea5959d5ab75bbf.zip
selftests/statmount: add statmount_alloc() helper
Add a helper to allocate a statmount buffer and call statmount(). This helper will be shared by multiple test suites that need to query mount information via statmount(). Link: https://patch.msgid.link/20260122-work-fsmount-namespace-v1-5-5ef0a886e646@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/testing/selftests/filesystems/open_tree_ns')
-rw-r--r--tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c b/tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c
index 9711556280ae..86d5d7a831c1 100644
--- a/tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c
+++ b/tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c
@@ -115,7 +115,7 @@ static void dump_mounts(struct __test_metadata *_metadata, uint64_t mnt_ns_id)
STATMOUNT_MNT_BASIC |
STATMOUNT_FS_TYPE |
STATMOUNT_MNT_ROOT |
- STATMOUNT_MNT_POINT);
+ STATMOUNT_MNT_POINT, 0);
if (!sm) {
TH_LOG(" [%zd] mnt_id %llu: statmount failed: %s",
i, (unsigned long long)list[i], strerror(errno));
@@ -746,7 +746,7 @@ TEST_F(open_tree_ns_userns, umount_fails_einval)
const char *mnt_point;
sm = statmount_alloc(list[i], new_ns_id,
- STATMOUNT_MNT_POINT);
+ STATMOUNT_MNT_POINT, 0);
if (!sm)
_exit(11);
@@ -863,7 +863,7 @@ TEST_F(open_tree_ns_userns, umount_succeeds)
const char *mnt_point;
sm = statmount_alloc(list[i], new_ns_id,
- STATMOUNT_MNT_POINT);
+ STATMOUNT_MNT_POINT, 0);
if (!sm)
_exit(11);
@@ -1003,7 +1003,7 @@ TEST_F(open_tree_ns_unbindable, recursive_skips_on_unbindable)
struct statmount *sm;
const char *mnt_point;
- sm = statmount_alloc(list[i], new_ns_id, STATMOUNT_MNT_POINT);
+ sm = statmount_alloc(list[i], new_ns_id, STATMOUNT_MNT_POINT, 0);
ASSERT_NE(sm, NULL) {
TH_LOG("statmount_alloc failed for mnt_id %llu",
(unsigned long long)list[i]);