FS/XFS testing framework
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] report: add support for the xunit-quiet format
Date: Sun, 10 Jul 2022 23:42:23 +0200	[thread overview]
Message-ID: <20220710234223.3cddaa96@suse.de> (raw)
In-Reply-To: <20220708223219.1872812-1-tytso@mit.edu>

On Fri,  8 Jul 2022 18:32:19 -0400, Theodore Ts'o wrote:

> The xunit-quiet format exludes the NNN.{full,dmesg,bad} files in
> <system-out> and <system-err> nodes.
> 
> For test runners that save the enttire results directory to preserve
> all of the test artifacts, capturing the NNN.{full,dmesg,bad} in the
> results.xml file is redundant.  In addition, if the NNN.bad is too
> large, it can cause the junitparser python library to refuse to parse
> the XML file to prevent potential denial of service attacks[1].  A
> simple way to avoid this problem is to simply to have xfstests to omit
> the <system-out> and <system-err> nodes.
> 
> [1] https://gitlab.com/gitlab-org/gitlab/-/issues/268035
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

Reviewed-by: David Disseldorp <ddiss@suse.de>
Looks fine. A minor nit below...

> ---
> 
> Note: this patch depends on David Disseldorp's "add option to rerun
> failed tests"  series.
> 
>  check         |  2 +-
>  common/report | 20 ++++++++++++++------
>  2 files changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/check b/check
> index 27ebb0c2..d4d436c0 100755
> --- a/check
> +++ b/check
> @@ -75,7 +75,7 @@ check options
>      -I <n>		iterate the test list <n> times, but stops iterating further in case of any test failure
>      -d			dump test output to stdout
>      -b			brief test summary
> -    -R fmt[,fmt]	generate report in formats specified. Supported format: [xunit]
> +    -R fmt[,fmt]	generate report in formats specified. Supported formats: xunit, xunit-quiet
>      --large-fs		optimise scratch device for large filesystems
>      -s section		run only specified section from config file
>      -S section		exclude the specified section from the config file
> diff --git a/common/report b/common/report
> index 5ca41bc4..cdf36b3e 100644
> --- a/common/report
> +++ b/common/report
> @@ -71,6 +71,12 @@ _xunit_make_testcase_report()
>  	local test_name="$2"
>  	local test_status="$3"
>  	local test_time="$4"
> +	local report_format="$5"
> +	local quiet
> +
> +	if [ "$report_format" = xunit-quiet ]; then
> +	    quiet=yes
        ^^^^
Nit: xfstests mostly uses tab based indentation. Same for ':' lower down

      reply	other threads:[~2022-07-10 21:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 22:32 [PATCH] report: add support for the xunit-quiet format Theodore Ts'o
2022-07-10 21:42 ` David Disseldorp [this message]

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=20220710234223.3cddaa96@suse.de \
    --to=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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