public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: Print failure hints only once to reduce log duplication
Date: Wed, 30 Oct 2024 13:06:45 +0100	[thread overview]
Message-ID: <20241030120645.GA888753@pevik> (raw)
In-Reply-To: <20241030084558.195297-1-liwang@redhat.com>

Hi all,

> The LTP test currently prints failure hints multiple times if a test
> encounters several TFAIL or TBROK results. This leads to unnecessarily
> verbose and duplicated logs.

> This patch modifies the `print_failure_hints()` function to ensure that
> failure hints are printed only once per test run. By setting `show_failure_hints`
> to 0 after the first print, subsequent calls to `print_failure_hints()`
> will not produce redundant output.

> Fixes: 701212f08 ("Disable failure hints before we actually run the test")
> Signed-off-by: Li Wang <liwang@redhat.com>
> Cc: Cyril Hrubis <chrubis@suse.cz>
...

> +++ b/lib/tst_test.c
> @@ -911,6 +911,8 @@ static void print_failure_hints(void)
>  	print_failure_hint("musl-git", "missing musl fixes", MUSL_GIT_URL);
>  	print_failure_hint("CVE", "vulnerable to CVE(s)", CVE_DB_URL);
>  	print_failure_hint("known-fail", "hit by known kernel failures", NULL);
> +
> +	show_failure_hints = 0;

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

Kind regards,
Petr

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

  reply	other threads:[~2024-10-30 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30  8:45 [LTP] [PATCH] lib: Print failure hints only once to reduce log duplication Li Wang
2024-10-30 12:06 ` Petr Vorel [this message]
2024-10-30 12:14 ` Cyril Hrubis
2024-10-30 12:15   ` Cyril Hrubis
2024-10-31  2:33     ` Li Wang

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=20241030120645.GA888753@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@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