public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/3] tst_test: fix again when test has both TPASS and TCONF
Date: Thu, 30 May 2019 17:18:43 +0200	[thread overview]
Message-ID: <20190530151843.GA25602@rei> (raw)
In-Reply-To: <f11c83459b71fbf399794fb8363f2b538b0b6346.1559207183.git.caspar@casparzhang.com>

Hi!
> Consider this situation: we get only TPASS and TCONF in test
> results, and the last status happens to be TPASS, the check
> condition in commit fecdd885eb4b ("tst_test: Fix exit value on
> tst_brk(TCONF, ...)" won't work. Fix it by removing unnecessary
> TCONF check.

What is the exact sequence of the tst_res()/tst_brk() calls leading to
this?

Because if the test function has exitted with 0 the do_exit() function
would be passed 0 and that case is handled already:

	if (results->skipped && !results->passed)
		ret |= TCONF;

> Fixes: 5390d6ea3657 ("lib/tst_test: Report 0 if test has both TPASS and TCONF")
> Signed-off-by: Caspar Zhang <caspar@linux.alibaba.com>
> ---
>  lib/tst_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 2d88adbd7..8ba122fbe 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -594,7 +594,7 @@ static void do_exit(int ret)
>  		printf("skipped  %d\n", results->skipped);
>  		printf("warnings %d\n", results->warnings);
>  
> -		if (results->passed && ret == TCONF)
> +		if (results->passed)
>  			ret = 0;

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2019-05-30 15:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30  9:09 [LTP] [PATCH 1/3] tst_test: fix again when test has both TPASS and TCONF Caspar Zhang
2019-05-30  9:09 ` [LTP] [PATCH 2/3] lib/test.sh: TCONF needs to be counted Caspar Zhang
2019-05-31  3:17   ` Li Wang
2019-06-09 15:40     ` Caspar Zhang
2019-06-10  8:01       ` Li Wang
2019-06-28 12:52   ` Caspar Zhang
2019-07-04 14:01     ` Cyril Hrubis
2019-05-30  9:09 ` [LTP] [PATCH 3/3] tst_test.sh, test.sh: report pass if both TPASS and TCONF exist in shell test Caspar Zhang
2019-05-31  3:37   ` Li Wang
2019-05-30 15:18 ` Cyril Hrubis [this message]
2019-05-30 16:40   ` [LTP] [PATCH 1/3] tst_test: fix again when test has both TPASS and TCONF Caspar Zhang

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=20190530151843.GA25602@rei \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox