public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Sagi Nakash <saginakash@gmail.com>
Cc: Martin Doucha <martin.doucha@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [RFC PATCH] ltp-pan: Report failure if testcases failed to run
Date: Fri, 21 Jan 2022 16:55:20 +0100	[thread overview]
Message-ID: <YerXaAm7cDPRwR4T@pevik> (raw)
In-Reply-To: <20211127121609.26837-1-saginakash@gmail.com>

Hi,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

@all: Do we want to include this one in the release?

Kind regards,
Petr

> In case a test fails to run in run_child() for some reason (signaled via
> SIGTERM/SIGTOP, execve() failure, etc.), runltp still reports success:
> "INFO: ltp-pan reported all tests PASS".

> Failed tests are reported via check_pids(), by checking their exit
> status, yet it doesn't catch tests which weren't able to run at all.

> exit_stat holds the exit status code: 0 in case of success in all tests,
> otherwise, the number of failed tests.

> Fix this by increasing exit_stat also when a test fails to run.

> Signed-off-by: Sagi Nakash <saginakash@gmail.com>
> ---
>  pan/ltp-pan.c | 2 ++
>  1 file changed, 2 insertions(+)

> diff --git a/pan/ltp-pan.c b/pan/ltp-pan.c
> index 0bdb51477..eff9a867d 100644
> --- a/pan/ltp-pan.c
> +++ b/pan/ltp-pan.c
> @@ -551,6 +551,8 @@ int main(int argc, char **argv)
>  				++num_active;
>  			if ((cpid != -1 || sequential) && starts > 0)
>  				--starts;
> +			if (cpid == -1 && track_exit_stats)
> +				exit_stat++;

>  			if (sequential)
>  				if (++c >= coll->cnt)

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

  parent reply	other threads:[~2022-01-21 15:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 12:16 [LTP] [RFC PATCH] ltp-pan: Report failure if testcases failed to run Sagi Nakash
2021-12-03 16:41 ` Sagi Nakash
2021-12-11  8:10   ` Sagi Nakash
2022-01-21 15:55 ` Petr Vorel [this message]
2022-01-21 19:20   ` Cyril Hrubis

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=YerXaAm7cDPRwR4T@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    --cc=saginakash@gmail.com \
    /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