From e897b9b1334bab7427f062e4ec1f4297676c60da Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Fri, 9 May 2025 15:32:38 +0200 Subject: 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 Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/20250509133240.529330-7-amir73il@gmail.com Reviewed-by: Christian Brauner Signed-off-by: Christian Brauner --- tools/testing/selftests/filesystems/utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/testing/selftests/filesystems/utils.h') 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 */ -- cgit v1.2.3