All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] fsconfig03: Quit on first error
@ 2025-07-24 17:00 Petr Vorel
  2025-07-25  7:52 ` Li Wang via ltp
  2025-07-28 13:29 ` Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2025-07-24 17:00 UTC (permalink / raw)
  To: ltp

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


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-28 14:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 17:00 [LTP] [PATCH 1/1] fsconfig03: Quit on first error Petr Vorel
2025-07-25  7:52 ` Li Wang via ltp
2025-07-28 13:29 ` Cyril Hrubis
2025-07-28 14:40   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.