All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] tests: clear the superblock before adding a device to the array.
@ 2021-07-22 18:28 Sudhakar Panneerselvam
  2021-08-02 14:45 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Sudhakar Panneerselvam @ 2021-07-22 18:28 UTC (permalink / raw)
  To: jes; +Cc: linux-raid

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-02 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.