linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] filesystems selftests cleanups and fanotify test
@ 2025-05-09 13:32 Amir Goldstein
  2025-05-09 13:32 ` [PATCH v2 1/8] selftests/filesystems: move wrapper.h out of overlayfs subdir Amir Goldstein
                   ` (9 more replies)
  0 siblings, 10 replies; 21+ messages in thread
From: Amir Goldstein @ 2025-05-09 13:32 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Jan Kara, John Hubbard, Miklos Szeredi, linux-fsdevel

Christian,

This adds a test for fanotify mount ns notifications inside userns [1].

While working on the test I ended up making lots of cleanups to reduce
build dependency on make headers_install.

These patches got rid of the dependency for my kvm setup for the
affected filesystems tests.

Building with TOOLS_INCLUDES dir was recommended by John Hubbard [2].

NOTE #1: these patches are based on a merge of vfs-6.16.mount
(changes wrappers.h) into v6.15-rc5 (changes mount-notify_test.c),
so if this cleanup is acceptable, we should probably setup a selftests
branch for 6.16, so that it can be used to test the fanotify patches.

NOTE #2: some of the defines in wrappers.h are left for overlayfs and
mount_setattr tests, which were not converted to use TOOLS_INCLUDES.
I did not want to mess with those tests.

Thanks,
Amir.

Changes since v1:
- Add test for fanotify mntns watch in userns
- Fix some braino in statmount_test_ns re-factoring
- Add cleanups to pidfd and mount_setattr tests
- Add syscall number defs for more archs
- Mention some more changes in commit messages
- Use ksft_print_msg() in helpers
- RVB from John Hubbard

[1] https://lore.kernel.org/linux-fsdevel/20250419100657.2654744-1-amir73il@gmail.com/
[2] https://lore.kernel.org/linux-fsdevel/6dd57f0e-34b4-4456-854b-a8abdba9163b@nvidia.com/

Amir Goldstein (8):
  selftests/filesystems: move wrapper.h out of overlayfs subdir
  selftests/fs/statmount: build with tools include dir
  selftests/pidfd: move syscall definitions into wrappers.h
  selftests/mount_settattr: remove duplicate syscall definitions
  selftests/fs/mount-notify: build with tools include dir
  selftests/filesystems: create get_unique_mnt_id() helper
  selftests/filesystems: create setup_userns() helper
  selftests/fs/mount-notify: add a test variant running inside userns

 tools/include/uapi/linux/fanotify.h           | 274 +++++++++
 tools/include/uapi/linux/mount.h              | 235 ++++++++
 tools/include/uapi/linux/nsfs.h               |  45 ++
 .../filesystems/mount-notify/.gitignore       |   1 +
 .../filesystems/mount-notify/Makefile         |   9 +-
 .../mount-notify/mount-notify_test.c          |  38 +-
 .../mount-notify/mount-notify_test_ns.c       | 557 ++++++++++++++++++
 .../selftests/filesystems/overlayfs/Makefile  |   2 +-
 .../filesystems/overlayfs/dev_in_maps.c       |   2 +-
 .../overlayfs/set_layers_via_fds.c            |   2 +-
 .../selftests/filesystems/statmount/Makefile  |   6 +-
 .../filesystems/statmount/statmount.h         |  36 ++
 .../filesystems/statmount/statmount_test_ns.c |  86 +--
 tools/testing/selftests/filesystems/utils.c   |  88 +++
 tools/testing/selftests/filesystems/utils.h   |   3 +
 .../filesystems/{overlayfs => }/wrappers.h    |  42 +-
 .../testing/selftests/mount_setattr/Makefile  |   2 +
 .../mount_setattr/mount_setattr_test.c        |  54 +-
 .../selftests/pidfd/pidfd_bind_mount.c        |  74 +--
 19 files changed, 1312 insertions(+), 244 deletions(-)
 create mode 100644 tools/include/uapi/linux/fanotify.h
 create mode 100644 tools/include/uapi/linux/mount.h
 create mode 100644 tools/include/uapi/linux/nsfs.h
 create mode 100644 tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
 rename tools/testing/selftests/filesystems/{overlayfs => }/wrappers.h (62%)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-05-15  9:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 13:32 [PATCH v2 0/8] filesystems selftests cleanups and fanotify test Amir Goldstein
2025-05-09 13:32 ` [PATCH v2 1/8] selftests/filesystems: move wrapper.h out of overlayfs subdir Amir Goldstein
2025-05-12  9:28   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 2/8] selftests/fs/statmount: build with tools include dir Amir Goldstein
2025-05-12  9:29   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 3/8] selftests/pidfd: move syscall definitions into wrappers.h Amir Goldstein
2025-05-12  9:29   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 4/8] selftests/mount_settattr: remove duplicate syscall definitions Amir Goldstein
2025-05-12  9:30   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 5/8] selftests/fs/mount-notify: build with tools include dir Amir Goldstein
2025-05-12  9:31   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 6/8] selftests/filesystems: create get_unique_mnt_id() helper Amir Goldstein
2025-05-12  9:31   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 7/8] selftests/filesystems: create setup_userns() helper Amir Goldstein
2025-05-12  9:37   ` Christian Brauner
2025-05-09 13:32 ` [PATCH v2 8/8] selftests/fs/mount-notify: add a test variant running inside userns Amir Goldstein
2025-05-12  9:33   ` Christian Brauner
2025-05-12  9:35 ` [PATCH v2 0/8] filesystems selftests cleanups and fanotify test Christian Brauner
2025-05-12  9:40 ` Christian Brauner
2025-05-14  8:25   ` Amir Goldstein
2025-05-15  9:13     ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).