[LTP] [PATCH 1/1] fsconfig03: Quit on first error
Li Wang
liwang@redhat.com
Fri Jul 25 09:52:53 CEST 2025
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
More information about the ltp
mailing list