[LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
Petr Vorel
pvorel@suse.cz
Mon Dec 13 20:34:19 CET 2021
LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that
filesystem instead of all supported filesystems.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/user-guide.txt | 2 ++
lib/tst_supported_fs_types.c | 9 +++++++++
2 files changed, 11 insertions(+)
diff --git a/doc/user-guide.txt b/doc/user-guide.txt
index 6a9fb33005..098916d23d 100644
--- a/doc/user-guide.txt
+++ b/doc/user-guide.txt
@@ -15,6 +15,8 @@ For running LTP network tests see `testcases/network/README.md`.
'n' or '0': never colorize.
| 'LTP_DEV' | Path to the block device to be used
(C: '.needs_device = 1', shell: 'TST_NEEDS_DEVICE=1').
+| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified filesystem instead all
+ supported (for tests with '.all_filesystems').
| 'LTP_DEV_FS_TYPE' | Filesystem used for testing (default: 'ext2').
| 'LTP_TIMEOUT_MUL' | Multiply timeout, must be number >= 1 (> 1 is useful for
slow machines to avoid unexpected timeout).
diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index fc072cadfd..f61c3e503d 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -139,8 +139,17 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)
unsigned int i, j = 0;
int skip_fuse;
enum tst_fs_impl sup;
+ const char *only_fs;
skip_fuse = tst_fs_in_skiplist("fuse", skiplist);
+ only_fs = getenv("LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE");
+
+ if (only_fs) {
+ tst_res(TINFO, "WARNING: testing only %s", only_fs);
+ if (tst_fs_is_supported(only_fs))
+ fs_types[0] = only_fs;
+ return fs_types;
+ }
for (i = 0; fs_type_whitelist[i]; i++) {
if (tst_fs_in_skiplist(fs_type_whitelist[i], skiplist)) {
--
2.34.1
More information about the ltp
mailing list