[LTP] [PATCH v6 0/8] shell: df01.sh: $TST_ALL_FILESYSTEMS

Petr Vorel pvorel@suse.cz
Thu Sep 15 11:36:31 CEST 2022


Hi,

Note, I give up on some duplicity in the code,
i.e. instead adding tst_fs_is_current_fs_supported()
I proposed in [1], I just make duplicity:

    if (tst_fs_in_skiplist(fs_type, skiplist))
        tst_brk(TCONF, "%s is not supported by the test", fs_type);

	if (!filesystems[0])
		tst_brk(TCONF, "There are no supported filesystems");

I also didn't implement different exit code for test not supported and
test being skipped TST_FS_UNAVAILABLE and TST_FS_UNSUPPORTED (Martin [2]).
It should be obvious from previous messages or we can easily implement
it after the release.

changes v5->v6
* Remove TST_FS_TYPE_FUSE (put the code just to df01.sh and
  tst_all_filesystems.sh test (Cyril [3])
* Remove tst_fs_is_supported_skiplist(), implement tst_fs_in_skiplist()
  instead.
* new commit to whitelist | in filtering variables

[1] https://lore.kernel.org/ltp/YyCJnQR7ORn3phVn@pevik/
[2] https://lore.kernel.org/ltp/70df29e7-0097-c698-b6ba-e3f87da3893f@suse.cz/
[3] https://lore.kernel.org/ltp/Yx9QFWuRMjDUAafp@yuki/


Petr Vorel (8):
  tst_supported_fs: Implement skip list
  zram01.sh: Use tst_supported_fs -s tmpfs
  tst_supported_fs: Support skip list when query single fs
  shell: Add $TST_SKIP_FILESYSTEMS + tests
  tst_test.sh: Add $TST_ALL_FILESYSTEMS
  tst_test.sh: Allow | after whitelisted variable
  shell: Add tests for TST_ALL_FILESYSTEMS=1
  df01.sh: Convert to TST_ALL_FILESYSTEMS=1

 doc/shell-test-api.txt                        |  11 +-
 lib/newlib_tests/shell/tst_all_filesystems.sh |  21 +++
 .../shell/tst_all_filesystems_skip.sh         |  16 +++
 .../shell/tst_skip_filesystems.sh             |  35 +++++
 .../shell/tst_skip_filesystems_skip.sh        |  17 +++
 lib/tst_supported_fs_types.c                  |   1 +
 runtest/commands                              |   8 +-
 runtest/smoketest                             |   2 +-
 testcases/commands/df/df01.sh                 |  28 +---
 .../kernel/device-drivers/zram/zram01.sh      |   3 +-
 testcases/lib/tst_supported_fs.c              |  71 +++++++--
 testcases/lib/tst_test.sh                     | 136 ++++++++++++------
 testcases/misc/lvm/generate_lvm_runfile.sh    |   2 +-
 testcases/misc/lvm/prepare_lvm.sh             |   2 +-
 14 files changed, 265 insertions(+), 88 deletions(-)
 create mode 100755 lib/newlib_tests/shell/tst_all_filesystems.sh
 create mode 100755 lib/newlib_tests/shell/tst_all_filesystems_skip.sh
 create mode 100755 lib/newlib_tests/shell/tst_skip_filesystems.sh
 create mode 100755 lib/newlib_tests/shell/tst_skip_filesystems_skip.sh

-- 
2.37.3



More information about the ltp mailing list