linux/tools/testing/selftests/filesystems/mount-notify
Amir Goldstein 781091f3f5
selftests/fs/mount-notify: add a test variant running inside userns
unshare userns in addition to mntns and verify that:

1. watching tmpfs mounted inside userns is allowed with any mark type
2. watching orig root with filesystem mark type is not allowed
3. watching mntns of orig userns is not allowed
4. watching mntns in userns where fanotify_init was called is allowed

mount events are only tested with the last case of mntns mark.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/20250509133240.529330-9-amir73il@gmail.com
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-05-12 11:40:13 +02:00
..
.gitignore selftests/fs/mount-notify: add a test variant running inside userns 2025-05-12 11:40:13 +02:00
Makefile selftests/fs/mount-notify: add a test variant running inside userns 2025-05-12 11:40:13 +02:00
mount-notify_test.c selftests/filesystems: create get_unique_mnt_id() helper 2025-05-12 11:40:12 +02:00
mount-notify_test_ns.c selftests/fs/mount-notify: add a test variant running inside userns 2025-05-12 11:40:13 +02:00