All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@trained-monkey.org>
To: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 2/5] tests: clear the superblock before adding a device to the array.
Date: Mon, 2 Aug 2021 10:45:59 -0400	[thread overview]
Message-ID: <e4fd4358-650f-f259-ca76-78a8342627d1@trained-monkey.org> (raw)
In-Reply-To: <20210722182803.GA25122@oracle.com>

On 7/22/21 2:28 PM, Sudhakar Panneerselvam wrote:
> This fixes '02lineargrow' test as prior metadata causes --add operation
> to fail.
> 
> Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
> ---
>  test | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/test b/test
> index 711a3c7a2076..39a85d77fa25 100755
> --- a/test
> +++ b/test
> @@ -48,7 +48,7 @@ mdadm() {
>  		;;
>  	esac
>  	case $* in
> -	*-C* | *--create* | *-B* | *--build* )
> +	*-C* | *--create* | *-B* | *--build* | *--add* )
>  		# clear superblock every time once creating or
>  		# building arrays, because it's always creating
>  		# and building array many times in a test case.
> @@ -59,7 +59,12 @@ mdadm() {
>  					$mdadm --zero $args > /dev/null
>  			}
>  		done
> -		$mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes
> +		if [[ $* == *--add* ]]
> +		then
> +			$mdadm 2> $targetdir/stderr --quiet "$@"
> +		else
> +			$mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes
> +		fi
>  		;;
>  	* )
>  		$mdadm 2> $targetdir/stderr --quiet "$@"
> 

I am not sure this is the right approach to fix this. --add has two
meanings and we would potentially want test cases where we make sure not
to add arrays with pre-existing meta-data on them. I think it's better
to fix this in 02lineargrow

Thanks,
Jes

      reply	other threads:[~2021-08-02 14:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 18:28 [PATCH 2/5] tests: clear the superblock before adding a device to the array Sudhakar Panneerselvam
2021-08-02 14:45 ` Jes Sorensen [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=e4fd4358-650f-f259-ca76-78a8342627d1@trained-monkey.org \
    --to=jes@trained-monkey.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=sudhakar.panneerselvam@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.