<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 14, 2021 at 3:34 AM Petr Vorel <<a href="mailto:pvorel@suse.cz">pvorel@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that<br>
filesystem instead of all supported filesystems.<br>
<br>
Signed-off-by: Petr Vorel <<a href="mailto:pvorel@suse.cz" target="_blank">pvorel@suse.cz</a>><br>
---<br>
doc/user-guide.txt | 2 ++<br>
lib/tst_supported_fs_types.c | 9 +++++++++<br>
2 files changed, 11 insertions(+)<br>
<br>
diff --git a/doc/user-guide.txt b/doc/user-guide.txt<br>
index 6a9fb33005..098916d23d 100644<br>
--- a/doc/user-guide.txt<br>
+++ b/doc/user-guide.txt<br>
@@ -15,6 +15,8 @@ For running LTP network tests see `testcases/network/README.md`.<br>
'n' or '0': never colorize.<br>
| 'LTP_DEV' | Path to the block device to be used<br>
(C: '.needs_device = 1', shell: 'TST_NEEDS_DEVICE=1').<br>
+| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified filesystem instead all<br>
+ supported (for tests with '.all_filesystems').<br></blockquote><div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">My only concern is that the variable name is too long and not easy</div><div class="gmail_default" style="font-size:small">to remember/understand usage. Can we find a better name?</div><div class="gmail_default" style="font-size:small"> LTP_ONE_FS_TYPE <br></div><div class="gmail_default" style="font-size:small"> LTP_ASGD_FD_TYPE</div><div class="gmail_default" style="font-size:small"> LTP_FS_TYPE_DEBUG </div><div class="gmail_default" style="font-size:small">or some else.</div><br></div><div><div class="gmail_default" style="font-size:small">P.s.</div></div><div><div class="gmail_default" style="font-size:small">And btw I often use .skip_filesystems skip other FS for debugging :).</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
| 'LTP_DEV_FS_TYPE' | Filesystem used for testing (default: 'ext2').<br>
| 'LTP_TIMEOUT_MUL' | Multiply timeout, must be number >= 1 (> 1 is useful for<br>
slow machines to avoid unexpected timeout).<br>
diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c<br>
index fc072cadfd..f61c3e503d 100644<br>
--- a/lib/tst_supported_fs_types.c<br>
+++ b/lib/tst_supported_fs_types.c<br>
@@ -139,8 +139,17 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)<br>
unsigned int i, j = 0;<br>
int skip_fuse;<br>
enum tst_fs_impl sup;<br>
+ const char *only_fs;<br>
<br>
skip_fuse = tst_fs_in_skiplist("fuse", skiplist);<br>
+ only_fs = getenv("LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE");<br>
+<br>
+ if (only_fs) {<br>
+ tst_res(TINFO, "WARNING: testing only %s", only_fs);<br>
+ if (tst_fs_is_supported(only_fs))<br>
+ fs_types[0] = only_fs;<br>
+ return fs_types;<br>
+ }<br>
<br>
for (i = 0; fs_type_whitelist[i]; i++) {<br>
if (tst_fs_in_skiplist(fs_type_whitelist[i], skiplist)) {<br>
-- <br>
2.34.1<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/listinfo/ltp</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>