public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: David Disseldorp <ddiss@suse.de>
Cc: fstests@vger.kernel.org, tytso@mit.edu
Subject: Re: [RFC PATCH v2 1/6] report: use array for REPORT_ENV_LIST
Date: Tue, 28 Jun 2022 07:54:27 -0700	[thread overview]
Message-ID: <YrsWI/NwDTQf2GJk@magnolia> (raw)
In-Reply-To: <20220627222256.14175-2-ddiss@suse.de>

On Tue, Jun 28, 2022 at 12:22:51AM +0200, David Disseldorp wrote:
> There's no need for multiple assignments.
> 
> Signed-off-by: David Disseldorp <ddiss@suse.de>
> ---
>  common/report | 26 +++++---------------------
>  1 file changed, 5 insertions(+), 21 deletions(-)
> 
> diff --git a/common/report b/common/report
> index 84d9e0a7..2b8285d8 100644
> --- a/common/report
> +++ b/common/report
> @@ -4,26 +4,10 @@
>  
>  # List of xfstests's enviroment variables to include reports
>  ## TODO automate list population inside common/conf
> -REPORT_ENV_LIST="$REPORT_ENV_LIST SECTION"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST FSTYP"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST PLATFORM"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST MKFS_OPTIONS"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST MOUNT_OPTIONS"
> -
> -REPORT_ENV_LIST="$REPORT_ENV_LIST HOST_OPTIONS"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST CHECK_OPTIONS"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST XFS_MKFS_OPTIONS"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST TIME_FACTOR"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST LOAD_FACTOR"
> -
> -REPORT_ENV_LIST="$REPORT_ENV_LIST TEST_DIR"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST TEST_DEV"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST SCRATCH_DEV"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST SCRATCH_MNT"
> -
> -REPORT_ENV_LIST="$REPORT_ENV_LIST OVL_UPPER"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST OVL_LOWER"
> -REPORT_ENV_LIST="$REPORT_ENV_LIST OVL_WORK"
> +REPORT_ENV_LIST=("SECTION" "FSTYP" "PLATFORM" "MKFS_OPTIONS" "MOUNT_OPTIONS" \
> +		 "HOST_OPTIONS" "CHECK_OPTIONS" "XFS_MKFS_OPTIONS" \
> +		 "TIME_FACTOR" "LOAD_FACTOR" "TEST_DIR" "TEST_DEV" \
> +		 "SCRATCH_DEV" "SCRATCH_MNT" "OVL_UPPER" "OVL_LOWER" "OVL_WORK")

Cheers for the end of a stringbuilder pattern,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  
>  encode_xml()
>  {
> @@ -70,7 +54,7 @@ _xunit_make_section_report()
>  
>  	# Properties
>  	echo -e "\t<properties>" >> $REPORT_DIR/result.xml
> -	for p in $REPORT_ENV_LIST;do
> +	for p in "${REPORT_ENV_LIST[@]}"; do
>  		_xunit_add_property "$p"
>  	done
>  	echo -e "\t</properties>" >> $REPORT_DIR/result.xml
> -- 
> 2.35.3
> 

  reply	other threads:[~2022-06-28 14:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 22:22 [RFC PATCH v2 0/6] check: add option to rerun failed tests David Disseldorp
2022-06-27 22:22 ` [RFC PATCH v2 1/6] report: use array for REPORT_ENV_LIST David Disseldorp
2022-06-28 14:54   ` Darrick J. Wong [this message]
2022-06-27 22:22 ` [RFC PATCH v2 2/6] report: pass through most details as function parameters David Disseldorp
2022-06-28 14:55   ` Darrick J. Wong
2022-06-27 22:22 ` [RFC PATCH v2 3/6] check: make a few variables local David Disseldorp
2022-06-28 14:56   ` Darrick J. Wong
2022-06-27 22:22 ` [RFC PATCH v2 4/6] check: append bad / notrun arrays in helper function David Disseldorp
2022-06-28 15:00   ` Darrick J. Wong
2022-06-27 22:22 ` [RFC PATCH v2 5/6] check: add -L <n> parameter to rerun failed tests David Disseldorp
2022-06-28 15:15   ` Darrick J. Wong
2022-06-28 22:34     ` David Disseldorp
2022-06-27 22:22 ` [RFC PATCH v2 6/6] check: stash full/dmesg/out.bad files on rerun David Disseldorp
2022-06-28 15:16   ` Darrick J. Wong
2022-06-28 22:36     ` David Disseldorp

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=YrsWI/NwDTQf2GJk@magnolia \
    --to=djwong@kernel.org \
    --cc=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