aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/filesystems/mount-notify
Commit message (Collapse)AuthorAgeFilesLines
* selftests/fs/mount-notify: Fix compilation failure.Xing Guo2025-09-022-19/+16
| | | | | | | | | | | | | Commit c6d9775c2066 ("selftests/fs/mount-notify: build with tools include dir") introduces the struct __kernel_fsid_t to decouple dependency with headers_install. The commit forgets to define a macro for __kernel_fsid_t and it will cause type re-definition issue. Signed-off-by: Xing Guo <[email protected]> Link: https://lore.kernel.org/[email protected] Acked-by: Amir Goldstein <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Christian Brauner <[email protected]>
* selftests/fs/mount-notify: add a test variant running inside usernsAmir Goldstein2025-05-123-1/+560
| | | | | | | | | | | | | | | | 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 <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Christian Brauner <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
* selftests/filesystems: create get_unique_mnt_id() helperAmir Goldstein2025-05-122-11/+5
| | | | | | | | | | | | | 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]>
* selftests/fs/mount-notify: build with tools include dirAmir Goldstein2025-05-122-20/+8
| | | | | | | | | | | | Copy the fanotify uapi header files to the tools include dir and define __kernel_fsid_t to decouple dependency with headers_install and then remove the redundant re-definitions of fanotify macros. 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]>
* selftests/fs/mount-notify: test also remove/flush of mntns marksAmir Goldstein2025-04-241-11/+46
| | | | | | | | Regression test for FAN_MARK_MNTFS | FAN_MARK_FLUSH bug. Signed-off-by: Amir Goldstein <[email protected]> Signed-off-by: Jan Kara <[email protected]> Link: https://patch.msgid.link/[email protected]
* selftests: add tests for mount notificationMiklos Szeredi2025-03-113-0/+524
Provide coverage for all mnt_notify_add() instances. Signed-off-by: Miklos Szeredi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>