[LTP] [PATCH 1/1] fsconfig03: Quit on first error

Petr Vorel pvorel@suse.cz
Thu Jul 24 19:00:03 CEST 2025


Test runs in loop 5000x, if it fails, it pollutes output a lot.

Currently bcachefs fails 4883x:
fsconfig03.c:53: TFAIL: fsconfig() passed unexpectedly

Skip with goto to keep check for a taint flags.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Hi all,

or do we want to quit after more errors, e.g. 10x?

Kind regards,
Petr

 testcases/kernel/syscalls/fsconfig/fsconfig03.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/kernel/syscalls/fsconfig/fsconfig03.c b/testcases/kernel/syscalls/fsconfig/fsconfig03.c
index add54769e0..985278986a 100644
--- a/testcases/kernel/syscalls/fsconfig/fsconfig03.c
+++ b/testcases/kernel/syscalls/fsconfig/fsconfig03.c
@@ -51,15 +51,18 @@ static void run(void)
 
 		if (!TST_RET) {
 			tst_res(TFAIL, "fsconfig() passed unexpectedly");
+			goto cleanup;
 		} else if (TST_RET != -1) {
 			tst_brk(TBROK | TTERRNO,
 				"Invalid fsconfig() return value %ld", TST_RET);
 		} else if (TST_ERR != EINVAL) {
 			tst_res(TFAIL | TTERRNO,
 				"fsconfig() failed with unexpected error");
+			goto cleanup;
 		}
 	}
 
+cleanup:
 	if (fd != -1)
 		SAFE_CLOSE(fd);
 
-- 
2.50.1



More information about the ltp mailing list