[LTP] [PATCH v7 00/16] statmount/listmount testing suites

Andrea Cervesato andrea.cervesato@suse.de
Wed Oct 9 10:29:02 CEST 2024


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 v7:
- fix statmount01
- add more EOVERFLOW tests in statmount07
- add more invalid tests in listmount04
- Link to v6: https://lore.kernel.org/r/20241008-listmount_statmount-v6-0-0fd456b6b9bf@suse.com

Changes in v6:
- fix statmount01
- add more EOVERFLOW tests in statmount06
- Link to v5: https://lore.kernel.org/r/20241008-listmount_statmount-v5-0-66f4e1a9e7db@suse.com

Changes in v5:
- usage of sx.data.stx_mask
- use TST_EXP_EQ_STR
- use tst_tmpdir_genpath()
- use !TST_PASS instead of TST_RET == -1
- listmount03
- listmount04
- statmount08
- Link to v4: https://lore.kernel.org/r/20240909-listmount_statmount-v4-0-39558204ddf0@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 (16):
      Add SAFE_STATX macro
      Add TST_EXP_EQ_STR 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 statmount06 test
      Add statmount07 test
      Add statmount08 test
      Add listmount03 test
      Add listmount04 test

 configure.ac                                      |   2 +
 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                                  |  14 ++
 testcases/kernel/syscalls/listmount/.gitignore    |   4 +
 testcases/kernel/syscalls/listmount/Makefile      |   7 +
 testcases/kernel/syscalls/listmount/listmount.h   |  27 ++++
 testcases/kernel/syscalls/listmount/listmount01.c |  63 +++++++++
 testcases/kernel/syscalls/listmount/listmount02.c | 105 ++++++++++++++
 testcases/kernel/syscalls/listmount/listmount03.c |  62 +++++++++
 testcases/kernel/syscalls/listmount/listmount04.c | 162 ++++++++++++++++++++++
 testcases/kernel/syscalls/statmount/.gitignore    |   8 ++
 testcases/kernel/syscalls/statmount/Makefile      |   7 +
 testcases/kernel/syscalls/statmount/statmount.h   |  51 +++++++
 testcases/kernel/syscalls/statmount/statmount01.c |  77 ++++++++++
 testcases/kernel/syscalls/statmount/statmount02.c |  84 +++++++++++
 testcases/kernel/syscalls/statmount/statmount03.c | 138 ++++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount04.c | 105 ++++++++++++++
 testcases/kernel/syscalls/statmount/statmount05.c | 123 ++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount06.c |  68 +++++++++
 testcases/kernel/syscalls/statmount/statmount07.c | 144 +++++++++++++++++++
 testcases/kernel/syscalls/statmount/statmount08.c |  65 +++++++++
 41 files changed, 1515 insertions(+), 32 deletions(-)
---
base-commit: 701212f08d6e850457cc2b10238f28662ef48471
change-id: 20240516-listmount_statmount-080965e2f80e

Best regards,
-- 
Andrea Cervesato <andrea.cervesato@suse.com>



More information about the ltp mailing list