[LTP] [PATCH 0/9] shell: nfs: $TST_ALL_FILESYSTEMS (.all_filesystems)

Petr Vorel pvorel@suse.cz
Thu Jun 9 23:42:14 CEST 2022


Hi,

this is quite ready $TST_ALL_FILESYSTEMS (i.e. support for LTP shell API
to run test on all available filesystems, equivalent of .all_filesystems
in C API). It's used in NFS tests, where I have questions (RFC).

As it uses testcases/lib/tst_supported_fs.c binary it supports the same
features as C API:
* detect supported filesystems
* run only on single filesystem with $LTP_SINGLE_FS_TYPE (debugging)

825e10a91 ("Skip tmpfs in all-filesystem shell tests")


TODO API:
* filtering filesystems when test does not run on certain filesystem
* (i.e. nfs01.sh on vfat) with $TST_SKIP_FILESYSTEMS (equivalent of
  skip_filesystems variable in C API)
* testcases/lib/tst_supported_fs.c skips tmpfs by default since
  825e10a91 ("Skip tmpfs in all-filesystem shell tests"). After
  implementing $TST_SKIP_FILESYSTEMS it could be removed.

TODO NFS tests:
* Do not require restart NFS server (otherwise legacy testcases/lib/daemonlib.sh
  would have to be used)

Comments are welcome.

Code is also at: https://github.com/pevik/ltp/tree/shell/all_filesystems.v2

Kind regards,
Petr

Petr Vorel (9):
  tst_test.sh: Add $TST_MOUNT_DEVICE
  df01.sh: Use TST_MOUNT_DEVICE=1
  tst_test.sh: allow ' in pattern for allowed variables
  shell: Add test for TST_MOUNT_DEVICE=1
  tst_test.sh: Add $TST_ALL_FILESYSTEMS
  tst_device: Remove unnecessary braces
  tst_device: Add clear command
  shell: Add test for TST_ALL_FILESYSTEMS=1
  nfs: Use TST_ALL_FILESYSTEMS=1

 doc/shell-test-api.txt                        |   3 +
 lib/newlib_tests/shell/tst_all_filesystems.sh |  27 +++++
 lib/newlib_tests/shell/tst_mount_device.sh    |  21 ++++
 testcases/commands/df/df01.sh                 |   5 +-
 testcases/lib/tst_device.c                    |  25 ++++-
 testcases/lib/tst_test.sh                     | 104 ++++++++++++------
 testcases/network/nfs/nfs_stress/nfs_lib.sh   |  25 +++--
 7 files changed, 159 insertions(+), 51 deletions(-)
 create mode 100755 lib/newlib_tests/shell/tst_all_filesystems.sh
 create mode 100755 lib/newlib_tests/shell/tst_mount_device.sh

-- 
2.36.1



More information about the ltp mailing list