From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib/tst_test.sh: don't call _tst_do_exit() recursively with tst_brk()
Date: Tue, 27 Nov 2018 16:01:20 +0100 [thread overview]
Message-ID: <20181127150120.GA14077@dell5510> (raw)
In-Reply-To: <f96d10e9-fb35-fe98-0ab0-3fd0c7891c42@oracle.com>
Hi Alexey,
> > + [ "$safe" -eq 1 ] && ttype=TWARN
> > +
> ttype=TBROK?
Correct, I'm sorry.
> > if [ -z "$cmd" ]; then
> > - [ "$safe" -eq 1 ] && \
> > - tst_brk_ TBROK "tst_rhost_run: command not defined"
> > - tst_res_ TWARN "tst_rhost_run: command not defined"
> > + tst_brk_ $ttype "tst_rhost_run: command not defined"
> > return 1
> I think we should only remove tst_res_ TWARN here. Otherwise it will exit
> the test for non-safe option too.
I see, I wrongly I use tst_brk_ on non safe as well.
...
> > - [ "$safe" -eq 1 ] && \
> > + if [ "$safe" -eq 1 ]; then
> > tst_brk_ TBROK "'$cmd' failed on '$RHOST': '$output'"
> > + return 1
> > + fi
> It looks as if someone forgot that tst_brk_ terminates the test :)
And here I got confused by _tst_do_exit :)
I'd keep TWARN, so correct part to your commit could be something like
patch bellow.
Kind regards,
Petr
@@ -161,9 +161,11 @@ tst_rhost_run()
OPTIND=0
if [ -z "$cmd" ]; then
- [ "$safe" -eq 1 ] && \
+ if [ "$safe" -eq 1 ]; then
tst_brk_ TBROK "tst_rhost_run: command not defined"
- tst_res_ TWARN "tst_rhost_run: command not defined"
+ else
+ tst_res_ TWARN "tst_rhost_run: command not defined"
+ fi
return 1
fi
next prev parent reply other threads:[~2018-11-27 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 16:03 [LTP] [PATCH] lib/tst_test.sh: don't call _tst_do_exit() recursively with tst_brk() Alexey Kodanev
2018-11-27 9:04 ` Petr Vorel
2018-11-27 13:42 ` Alexey Kodanev
2018-11-27 15:01 ` Petr Vorel [this message]
2018-11-27 15:09 ` Petr Vorel
2018-11-30 18:18 ` [LTP] WIKI updates via git Petr Vorel
2018-12-04 11:47 ` Alexey Kodanev
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=20181127150120.GA14077@dell5510 \
--to=pvorel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox