public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@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 12:08:55 +0100	[thread overview]
Message-ID: <Z4eXR-VoAjnc20cm@yuki.lan> (raw)
In-Reply-To: <Z4eVyQM2kiYrz3f8@yuki.lan>

Hi!
> commit 55bfa08e179de16773f19b703de70262896383ea
> Author: Petr Vorel <pvorel@suse.cz>
> Date:   Thu Dec 14 15:00:10 2023 +0100
> 
>     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

And of course add:
	unset TST_DO_EXIT
after the cleanup.

>         if [ "$TST_MOUNT_FLAG" = 1 ]; then
> 
> 
> And possibly change the TST_DO_EXIT to TST_TBROK_TO_TWARN as well.
> 
> -- 
> Cyril Hrubis
> chrubis@suse.cz
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2025-01-15 11:09 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 [this message]
2025-01-15 12:41   ` Petr Vorel

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=Z4eXR-VoAjnc20cm@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox