[LTP] [PATCH] lib/tst_test: Fix FS kernel supported check

Petr Vorel pvorel@suse.cz
Wed Oct 29 09:36:08 CET 2025


Hi all,

> In case that there is only single filesystem defined in
> tst_test.filesystems we format the device in the setup rather in the
> function that iterates over all filesystems. However we missed a check
> if a filesystem is supported in this shortcut, hence if mkfs for the
> filesystem was installed and kernel support was missing the test failed
> when it attempted to mount the filesystem.

> Tested-by: Anders Roxell <anders.roxell@linaro.org>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>

Reported-by: Anders Roxell <anders.roxell@linaro.org>
:)

> +++ b/lib/tst_test.c
> @@ -1530,6 +1530,10 @@ static void do_setup(int argc, char *argv[])
>  		tdev.fs_type = default_fs_type();

>  		if (!tst_test->all_filesystems && count_fs_descs() <= 1) {
> +
> +			if (!tst_fs_is_supported(tdev.fs_type))
> +				tst_brk(TCONF, "The %s filesystem is not supported", tdev.fs_type);

Reviewed-by: Petr Vorel <pvorel@suse.cz>
Thanks to both!

Kind regards,
Petr


More information about the ltp mailing list