public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] lib/tst_test.c: Restrict that tst_brk() only works with TBROK/TCONF
Date: Fri, 9 Nov 2018 02:54:51 -0500 (EST)	[thread overview]
Message-ID: <1919219905.71573908.1541750091092.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <5BE4F51E.3060900@cn.fujitsu.com>



----- Original Message -----
> On 2018/11/09 1:53, Jan Stancek wrote:
> > ----- Original Message -----
> >> 1) Add tst_check_ttype() to check if TPASS/TFAIL/TWARN/TINFO is
> >>     passed into tst_brk() and convert it to TBROK forcely.
> >> 2) Only update test result in library process and main test process
> >>     because the exit status of child can be passed into main test
> >>     process by check_child_status().
> >> 3) Increase the number of skipped when calling tst_brk(TCONF).
> >> 4) Increase the number of warnings when calling tst_brk(TBROK) in
> >>     test cleanup(), other than that print "Test broken!" when calling
> >>     tst_brk(TBROK).
> >>
> >> Fix: #408
> >>
> >> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
> >> ---
> >>   lib/tst_test.c | 28 ++++++++++++++++++++++++++--
> >>   1 file changed, 26 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/lib/tst_test.c b/lib/tst_test.c
> >> index 661fbbf..c8d8eff 100644
> >> --- a/lib/tst_test.c
> >> +++ b/lib/tst_test.c
> >> @@ -55,6 +55,7 @@ struct results {
> >>   	int skipped;
> >>   	int failed;
> >>   	int warnings;
> >> +	int broken;
> > Hi,
> >
> > I don't follow what benefit this provides. It generates message "Test
> > broken",
> > but we already know that test is broken by message in tst_vbrk_() /
> > tst_cvres().
> Hi Jan,
> 
> We can remove the unnecessary message "Test broken", and also apply the check
> for
> ttype in tst_brk() written by your patch.

Or maybe add "Broken: " to summary?

> 
> According to the issue #$08, we want to increase result counters when calling
> tst_brk().
> e.g.
> 1) Increase the skipped counter when calling tst_brk(TCONF).
> 2) Increase the warnings counter when calling tst_brk(TBROK/FAIL) in
>     test cleanup(), other than that increase the failed counter when
>     calling tst_brk(TBROK/FAIL).

I'd keep counters reflecting the messages. I imagine if summary says
"warnings: 1", people would be searching for 'WARN' in output.

TCONF - print CONF message, increase skipped
TFAIL - print FAIL message, increase failed
TBROK - print BROK message, increase broken

What do you think?

Regards,
Jan


  parent reply	other threads:[~2018-11-09  7:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 12:55 [LTP] [PATCH 1/2] lib: Introduce tst_strttype() Xiao Yang
2018-11-08 12:55 ` [LTP] [PATCH 2/2] lib/tst_test.c: Restrict that tst_brk() only works with TBROK/TCONF Xiao Yang
2018-11-08 17:53   ` Jan Stancek
2018-11-09  2:46     ` Xiao Yang
2018-11-09  3:12       ` Xiao Yang
2018-11-09  7:54       ` Jan Stancek [this message]
2018-11-09  8:17         ` Xiao Yang
2018-11-09 17:52           ` Jan Stancek
2018-11-12  2:29             ` Xiao Yang
2018-12-11 15:17               ` Cyril Hrubis
2018-12-12  7:14                 ` Xiao Yang
2019-01-07 13:30                   ` Cyril Hrubis
2018-12-13  8:35                 ` [LTP] [PATCH v3 1/3] lib: Introduce tst_strttype() Xiao Yang
2018-12-13  8:35                   ` [LTP] [PATCH v3 2/3] lib/tst_test.c: Update result counters when calling tst_brk() Xiao Yang
2019-01-07 15:06                     ` Cyril Hrubis
2019-01-07 17:39                       ` Jan Stancek
2019-01-07 18:29                         ` Cyril Hrubis
2019-01-08 13:11                         ` Cyril Hrubis
2019-01-08  9:08                       ` Xiao Yang
2018-12-13  8:36                   ` [LTP] [PATCH v3 3/3] lib/tst_test.c: Convert TFAIL to TWARN in test cleanup Xiao Yang
2019-01-07 13:34                     ` Cyril Hrubis
2019-01-07 14:28                       ` Jan Stancek
2018-11-09  7:06     ` [LTP] [PATCH v2 1/2] lib: Introduce tst_strttype() Xiao Yang
2018-11-09  7:06       ` [LTP] [PATCH v2 2/2] lib/tst_test.c: Update result counters when calling tst_brk() Xiao Yang

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=1919219905.71573908.1541750091092.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --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