selftests/filesystems: create get_unique_mnt_id() helper
authorAmir Goldstein <amir73il@gmail.com>
Fri, 9 May 2025 13:32:38 +0000 (15:32 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 12 May 2025 09:40:12 +0000 (11:40 +0200)
commite897b9b1334bab7427f062e4ec1f4297676c60da
tree76853a7be279852a55894efaa9a8a2a95b0f57be
parentc6d9775c2066a37385e784ee2e0ce83bd6644610
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 <jhubbard@nvidia.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250509133240.529330-7-amir73il@gmail.com
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/filesystems/mount-notify/Makefile
tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
tools/testing/selftests/filesystems/statmount/Makefile
tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
tools/testing/selftests/filesystems/utils.c
tools/testing/selftests/filesystems/utils.h