[LTP] [PATCH v6 3/8] tst_supported_fs: Support skip list when query single fs
Petr Vorel
pvorel@suse.cz
Thu Sep 15 11:36:34 CEST 2022
And use this feature in zram01.sh.
Also print TINFO if test it supported by the test, quit with TCONF
otherwise (code from do_test_setup() tst_test.c).
Acked-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Li Wang <liwang@redhat.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/lib/tst_supported_fs.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/testcases/lib/tst_supported_fs.c b/testcases/lib/tst_supported_fs.c
index 2b42d5bb3..e2261244d 100644
--- a/testcases/lib/tst_supported_fs.c
+++ b/testcases/lib/tst_supported_fs.c
@@ -80,14 +80,19 @@ int main(int argc, char *argv[])
return 2;
}
- if (optind < argc)
- return !tst_fs_is_supported(argv[optind]);
+ if (optind < argc) {
+ if (tst_fs_in_skiplist(argv[optind], (const char * const*)skiplist))
+ tst_brk(TCONF, "%s is not supported by the test", argv[optind]);
+ tst_res(TINFO, "%s is supported by the test", argv[optind]);
+
+ return 0;
+ }
filesystems = tst_get_supported_fs_types((const char * const*)skiplist);
if (!filesystems[0])
- tst_brk(TCONF, "There are no supported filesystems");
+ tst_brk(TCONF, "There are no supported filesystems or all skipped");
for (i = 0; filesystems[i]; i++)
printf("%s\n", filesystems[i]);
--
2.37.3
More information about the ltp
mailing list