* [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
* Re: [LTP] [PATCH 1/1] fsconfig03: Quit on first error
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
1 sibling, 0 replies; 4+ messages in thread
From: Li Wang via ltp @ 2025-07-25 7:52 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Fri, Jul 25, 2025 at 1:00 AM Petr Vorel <pvorel@suse.cz> wrote:
> 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>
>
Reviewed-by: Li Wang <liwang@redhat.com>
---
> Hi all,
>
> or do we want to quit after more errors, e.g. 10x?
>
Maybe not needed, once failure in the loops should be clearly visible.
>
> 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
>
>
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 1/1] fsconfig03: Quit on first error
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
1 sibling, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2025-07-28 13:29 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi!
> 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;
Shouldn't break; be better in this case?
Otherwise it looks good.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 1/1] fsconfig03: Quit on first error
2025-07-28 13:29 ` Cyril Hrubis
@ 2025-07-28 14:40 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2025-07-28 14:40 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
> Hi!
> > 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;
> Shouldn't break; be better in this case?
Ah, sure. I'll merge with break.
Thank you!
Kind regards,
Petr
> Otherwise it looks good.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [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.