From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
To: jes@trained-monkey.org
Cc: linux-raid@vger.kernel.org
Subject: [PATCH 2/5] tests: clear the superblock before adding a device to the array.
Date: Thu, 22 Jul 2021 18:28:03 +0000 [thread overview]
Message-ID: <20210722182803.GA25122@oracle.com> (raw)
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 "$@"
--
1.8.3.1
next reply other threads:[~2021-07-22 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 18:28 Sudhakar Panneerselvam [this message]
2021-08-02 14:45 ` [PATCH 2/5] tests: clear the superblock before adding a device to the array Jes Sorensen
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=20210722182803.GA25122@oracle.com \
--to=sudhakar.panneerselvam@oracle.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
/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