aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/filesystems/utils.h
diff options
context:
space:
mode:
authorAmir Goldstein <[email protected]>2025-05-09 13:32:38 +0000
committerChristian Brauner <[email protected]>2025-05-12 09:40:12 +0000
commite897b9b1334bab7427f062e4ec1f4297676c60da (patch)
tree76853a7be279852a55894efaa9a8a2a95b0f57be /tools/testing/selftests/filesystems/utils.h
parentselftests/fs/mount-notify: build with tools include dir (diff)
downloadkernel-e897b9b1334bab7427f062e4ec1f4297676c60da.tar.gz
kernel-e897b9b1334bab7427f062e4ec1f4297676c60da.zip
selftests/filesystems: create get_unique_mnt_id() helper
Add helper to utils.c and use it in mount-notify and statmount tests. Linking with utils.c drags in a dependecy with libcap, so add it to the Makefile of the tests. Reviewed-by: John Hubbard <[email protected]> Signed-off-by: Amir Goldstein <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/testing/selftests/filesystems/utils.h')
-rw-r--r--tools/testing/selftests/filesystems/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/filesystems/utils.h b/tools/testing/selftests/filesystems/utils.h
index 7f1df2a3e94c..d9cf145b321a 100644
--- a/tools/testing/selftests/filesystems/utils.h
+++ b/tools/testing/selftests/filesystems/utils.h
@@ -42,4 +42,6 @@ static inline bool switch_userns(int fd, uid_t uid, gid_t gid, bool drop_caps)
return true;
}
+extern uint64_t get_unique_mnt_id(const char *path);
+
#endif /* __IDMAP_UTILS_H */