From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_test.sh: Fix TBROK => TWARN evaluation
Date: Wed, 15 Jan 2025 13:41:15 +0100 [thread overview]
Message-ID: <20250115124115.GB648257@pevik> (raw)
In-Reply-To: <Z4eVyQM2kiYrz3f8@yuki.lan>
Hi Cyril,
> Hi!
> This I suppose got broken in:
> commit 55bfa08e179de16773f19b703de70262896383ea
> Author: Petr Vorel <pvorel@suse.cz>
> Date: Thu Dec 14 15:00:10 2023 +0100
FYI it was broken by 5c36ae3e30 ("tst_test.sh: Call cleanup function only after
test start") (much earlier than 55bfa08e17).
> tst_test.sh/tst_brk(): Convert only TBROK to TWARN in cleanup
> The original code only only depended on TST_DO_EXIT being set. I guess
> that the easiest fix here would be actually to revert that patch. That
> is because we mostly call the cleanup from _tst_do_exit() which sets the
> TST_DO_EXIT before it calls _tst_do_cleanup(). The only place where we
> call _tst_do_cleanup() wihout the TST_DO_EXIT is inside of the
> _tst_run_iterations(), if we wanted to convert TBROK to TWARN in that
> case we can simply do:
> diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> index cfdae0230..ac1caebcb 100644
> --- a/testcases/lib/tst_test.sh
> +++ b/testcases/lib/tst_test.sh
> @@ -820,6 +820,7 @@ _tst_run_iterations()
> _tst_i=$((_tst_i-1))
> done
> + TST_DO_EXIT=1
> _tst_do_cleanup
OK, you would revert 55bfa08e179de16773f19b703de70262896383ea + use variable as
guard here (TST_TBROK_TO_TWARN or whatever name it uses).
I'll try to test it. BTW I remember in the past there were problems when setup
got tst_brk TCONF, which calls the cleanup.
Kind regards,
Petr
> if [ "$TST_MOUNT_FLAG" = 1 ]; then
> And possibly change the TST_DO_EXIT to TST_TBROK_TO_TWARN as well.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-01-15 12:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 0:14 [LTP] [PATCH 1/1] tst_test.sh: Fix TBROK => TWARN evaluation Petr Vorel
2025-01-15 11:02 ` Cyril Hrubis
2025-01-15 11:08 ` Cyril Hrubis
2025-01-15 12:41 ` Petr Vorel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250115124115.GB648257@pevik \
--to=pvorel@suse.cz \
--cc=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.