[LTP] [PATCH v4 4/9] tst_supported_fs: Support skip list when query single fs
Petr Vorel
pvorel@suse.cz
Fri Sep 9 16:47:27 CEST 2022
> On 09. 09. 22 16:22, Petr Vorel wrote:
> > OK, this is not in v5. I don't mind to send v6 on Monday, if we agree this
> > is wanted. Implementation detail: should I use for -2 and -1 for these two values?
> > (code < 0 would be error, code > 0 would be OK, 0 itself skipped)
> One more thing, the skiplist check should be done before availability check.
> It's faster and it'll save you work when you're trying to fix tests that
> shouldn't be skipped.
Good point. I guess you mean just to reverse order in
tst_fs_is_supported_skiplist(), right?
Kind regards,
Petr
+++ lib/tst_supported_fs_types.c
@@ -137,17 +137,10 @@ enum tst_fs_impl tst_fs_is_supported(const char *fs_type)
enum tst_fs_impl tst_fs_is_supported_skiplist(const char *fs_type, const char
*const *skiplist)
{
- int ret;
-
- ret = tst_fs_is_supported(fs_type);
-
- if (!ret)
- return ret;
-
if (tst_fs_in_skiplist(fs_type, skiplist))
return TST_FS_UNSUPPORTED;
- return ret;
+ return tst_fs_is_supported(fs_type);
}
const char **tst_get_supported_fs_types(const char *const *skiplist)
More information about the ltp
mailing list