lib/tst_test: Fix FS kernel supported check
PATCH 1/1 lib/tst_test: Fix FS kernel supported check
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.
--- lib/tst_test.c | 4 ++++ 1 file changed, 4 insertions(+)
lib/tst_test.c +4 -0
@@ -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); +if (tst_test->filesystems && tst_test->filesystems->mkfs_ver)tst_check_cmd (tst_test->filesystems->mkfs_ver,1 );
Signature · 5 lines
2.49.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 10 lines · Cyril Hrubis
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 <[email protected]>Signed-off-by Cyril Hrubis <[email protected]>
---
Quoted 29 lines
lib/tst_test.c | 4 ++++ 1 file changed, 4 insertions(+)lib/tst_test.c +4
-0@@ -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); +if (tst_test->filesystems && tst_test->filesystems->mkfs_ver)
tst_check_cmd(tst_test->filesystems->mkfs_ver, 1);--
2.49.1--
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi all,
Quoted 9 lines
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 <[email protected]>Signed-off-by Cyril Hrubis <[email protected]>
:)
lib/tst_test.c static void do_setup(int argc, char *argv[]) · line 1535
Quoted 8 lines
+++
b/lib/tst_test.clib/tst_test.c +3
-0@@ -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);
Thanks to both!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi all,
I dared to merge the patch.
Thanks to all!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp