Skip to contentSkip to conversation

lib/tst_test.c: Make use of the run_tcase_on_fs() return value

PATCH New Cyril Hrubis 1 participant 1 message Oct 1, 2024 Library code

lore
Share & tools
lore
#0 lore raw

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

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')
---
 lib/tst_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_test.c +1 -1
index d226157e0..ae3fc4084 100644
@@ -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;
Signature · 5 lines
2.45.2


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp