mbox series

[v4,00/13] statmount/listmount testing suites

Message ID 20240909-listmount_statmount-v4-0-39558204ddf0@suse.com
Headers show
Series statmount/listmount testing suites | expand

Message

Andrea Cervesato Sept. 9, 2024, 10 a.m. UTC
This patch-set is adding new testing suites for statmount() and listmount()
syscalls, which have been recently added in kernel v6.8.
To find out more information, please read the following documentation since
there's no man pages yet:

https://lwn.net/Articles/950569/
https://lore.kernel.org/lkml/170474400576.2602.7882507604401153304.pr-tracker-bot@kernel.org/T/

Along with kernel source code:

https://github.com/torvalds/linux/blob/1b294a1f35616977caddaddf3e9d28e576a1adbc/include/uapi/linux/mount.h#L155
https://github.com/torvalds/linux/blob/1b294a1f35616977caddaddf3e9d28e576a1adbc/tools/testing/selftests/filesystems/statmount/statmount_test.c

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v4:
- listmount01: remove all filesystems run
- listmount02: better descriptions and proper unmount()
- statmount01: check all fields are zeroed
- statmount02: check also readonly flag
- statmount03: now it checks for all mount flags
- statmount04: moved read_peer_group inside statmount.h
- statmount07: add test for invalid values
- generic style fixes 
- fix statx import
- Link to v3: https://lore.kernel.org/r/20240516-listmount_statmount-v3-0-2ff4ba29bba7@suse.com

---
Andrea Cervesato (13):
      Add SAFE_STATX macro
      Add listmount/statmount syscalls
      Add listmount/statmount fallback declarations
      Add listmount01 test
      Add listmount02 test
      Add statmount01 test
      Add statmount02 test
      Add statmount03 test
      Add statmount04 test
      Add statmount05 test
      Add TST_EXP_EQ_STR macro
      Add statmount06 test
      Add statmount07 test

 compile_flags.txt                                  |   1 +
 configure.ac                                       |   4 +
 include/lapi/mount.h                               |  70 +++++++++++
 include/lapi/stat.h                                | 111 ++++++++++++-----
 include/lapi/syscalls/aarch64.in                   |   2 +
 include/lapi/syscalls/arc.in                       |   2 +
 include/lapi/syscalls/arm.in                       |   2 +
 include/lapi/syscalls/hppa.in                      |   2 +
 include/lapi/syscalls/i386.in                      |   2 +
 include/lapi/syscalls/ia64.in                      |   2 +
 include/lapi/syscalls/loongarch.in                 |   2 +
 include/lapi/syscalls/mips_n32.in                  |   2 +
 include/lapi/syscalls/mips_n64.in                  |   2 +
 include/lapi/syscalls/mips_o32.in                  |   2 +
 include/lapi/syscalls/powerpc.in                   |   2 +
 include/lapi/syscalls/powerpc64.in                 |   2 +
 include/lapi/syscalls/s390.in                      |   2 +
 include/lapi/syscalls/s390x.in                     |   2 +
 include/lapi/syscalls/sh.in                        |   2 +
 include/lapi/syscalls/sparc.in                     |   2 +
 include/lapi/syscalls/sparc64.in                   |   2 +
 include/lapi/syscalls/x86_64.in                    |   2 +
 include/tst_test_macros.h                          |  14 +++
 runtest/syscalls                                   |  11 ++
 testcases/kernel/syscalls/fchmodat2/fchmodat2_01.c |   2 +
 testcases/kernel/syscalls/listmount/.gitignore     |   2 +
 testcases/kernel/syscalls/listmount/Makefile       |   7 ++
 testcases/kernel/syscalls/listmount/listmount.h    |  26 ++++
 testcases/kernel/syscalls/listmount/listmount01.c  |  63 ++++++++++
 testcases/kernel/syscalls/listmount/listmount02.c  | 105 ++++++++++++++++
 testcases/kernel/syscalls/statmount/.gitignore     |   7 ++
 testcases/kernel/syscalls/statmount/Makefile       |   7 ++
 testcases/kernel/syscalls/statmount/statmount.h    |  50 ++++++++
 testcases/kernel/syscalls/statmount/statmount01.c  |  82 ++++++++++++
 testcases/kernel/syscalls/statmount/statmount02.c  |  84 +++++++++++++
 testcases/kernel/syscalls/statmount/statmount03.c  | 137 +++++++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount04.c  | 105 ++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount05.c  | 128 +++++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount06.c  |  68 ++++++++++
 testcases/kernel/syscalls/statmount/statmount07.c  |  75 +++++++++++
 40 files changed, 1163 insertions(+), 32 deletions(-)
---
base-commit: 6df425bb7040e1c849cb84a83f5e8808967efc0e
change-id: 20240516-listmount_statmount-080965e2f80e

Best regards,