[LTP] [PATCH] lib/tst_test.c: Make use of the run_tcase_on_fs() return value

Cyril Hrubis chrubis@suse.cz
Tue Oct 1 17:19:18 CEST 2024


When the support for per-testcase FS parameters was added the
code that prepares a device along with the fork_testrun() call was put
into a run_tcase_on_fs() function. However by a mistake the return value
from this function wasn't used properly.

The difference is that the test library did exit the whole test if a
single filesystem iteration reported TBROK or an invalid return value.

Without this patch the library carries on even if there was a fatal
problem reported.

Fixes: cce6188916b9 ('lib: tst_test: Add per filesystem mkfs and mount opts')
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 lib/tst_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index d226157e0..ae3fc4084 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1832,7 +1832,7 @@ static int run_tcases_per_fs(void)
 		if (!fs)
 			continue;
 
-		run_tcase_on_fs(fs, filesystems[i]);
+		ret = run_tcase_on_fs(fs, filesystems[i]);
 
 		if (ret == TCONF)
 			continue;
-- 
2.45.2



More information about the ltp mailing list