[LTP] [PATCH v5 03/10] tst_supported_fs: Print TCONF if no filesystem supported
Petr Vorel
pvorel@suse.cz
Tue Sep 13 11:29:26 CEST 2022
> Hi!
> > > 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].
> I guess that we misunderstand each other. I'm fine with the library
> printing messages, what I didn't like was the tst_brk() which made the
> whole program execution flow obscured.
OK, instead of this from v4:
> + if (tst_fs_in_skiplist(fs_type, skiplist)) {
> + tst_brk(TCONF, "%s is not supported by the test",
> + fs_type);
I'll add in v6:
> + if (tst_fs_in_skiplist(fs_type, skiplist)) {
> + tst_res(TCONF, "%s is not supported by the test",
> + fs_type);
> + return TST_FS_UNSUPPORTED;
> + }
I'll add tst_res(TINFO, "%s is supported by the test", fs_name);
from do_test_setup() tst_fs_is_supported_skiplist() and call
tst_fs_is_supported_skiplist() in do_test_setup().
But not sure if there can be a cleanup of duplicity of:
if (!filesystems[0])
tst_brk(TCONF, "There are no supported filesystems")
Kind regards,
Petr
More information about the ltp
mailing list