[LTP] [PATCH v5 03/10] tst_supported_fs: Print TCONF if no filesystem supported

Petr Vorel pvorel@suse.cz
Mon Sep 12 22:29:54 CEST 2022


> Hi!
> > Although this is unlikely, it can happen.
> > This means 32 (TCONF) instead of 0 exit code when searching for all
> > filesystems and 32 instead of 1 when searching for a particular
> > filesystem.

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > New in v5

> > NOTE:

> > Although this will later leads to duplicating message (see below) it's
> > IMHO better because LVM scripts and zram01.sh use this helper directly.

> > Tests added in later commits which demonstrates TCONF:

> Shouldn't we rather than this add tst_res(TCONF, "...") messages to the
> lib/tst_supported_fs_types.c so that we get consistent messages between
> C and shell?

Well, in v4 I add TCONF in tst_fs_is_supported_skiplist()
(lib/tst_supported_fs_types.c), but you asked for TST_FS_UNSUPPORTED [1].

This function is used only in testcases/lib/tst_supported_fs.c, i.e. in shell.
C API handles skip list in do_test_setup() (lib/tst_test.c). I don't like this
inconsistency either, but not sure now how to put common code to
lib/tst_supported_fs_types.c (new function).

There is also inconsistency in "There are no supported filesystems"
(run_tcases_per_fs in lib/tst_test.c) and "There are no supported filesystems or
all skipped" in testcases/lib/tst_supported_fs.c. I'm not sure if it's worth to
add function tst_loop_per_fs (or macro in kernel style TST_FOR_EACH_FS()), so
that check and TCONF would be on single place.

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/YxsKz9j1mVHIhcfw@yuki/


More information about the ltp mailing list