From: NeilBrown Date: Tue, 30 Apr 2013 23:24:11 +0000 (+1000) Subject: tests: zero devices before --adding them. X-Git-Tag: mdadm-3.3-rc1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79b2ed4f243b4ac59b4985f513b87dcde4fa6b8f;p=thirdparty%2Fmdadm.git tests: zero devices before --adding them. Linux 3.10 will allow more "--add" to be handled as "--re-add". To be sure the tests work correctly we sometimes need to zero the device to ensure it really is an --add that happens. Signed-off-by: NeilBrown --- diff --git a/tests/05r1-bitmapfile b/tests/05r1-bitmapfile index e1fc3de8..fcd8372b 100644 --- a/tests/05r1-bitmapfile +++ b/tests/05r1-bitmapfile @@ -33,6 +33,7 @@ mdadm -S $md0 mdadm --assemble -R $md0 --bitmap=$bmf $dev2 dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'` +mdadm --zero $dev1 # force --add, not --re-add mdadm $md0 --add $dev1 #it is too fast# check recovery diff --git a/tests/05r5-bitmapfile b/tests/05r5-bitmapfile index c7537583..6d173d88 100644 --- a/tests/05r5-bitmapfile +++ b/tests/05r5-bitmapfile @@ -32,6 +32,7 @@ fi mdadm -S $md0 mdadm --assemble -R $md0 --bitmap=$bmf $dev2 $dev3 +mdadm --zero $dev1 # force add, not re-add mdadm $md0 --add $dev1 check recovery diff --git a/tests/05r5-internalbitmap b/tests/05r5-internalbitmap index 591c9dbf..13dc5921 100644 --- a/tests/05r5-internalbitmap +++ b/tests/05r5-internalbitmap @@ -30,6 +30,7 @@ fi mdadm -S $md0 mdadm --assemble -R $md0 $dev2 $dev3 +mdadm --zero $dev1 # force --add, not --re-add mdadm $md0 --add $dev1 check recovery diff --git a/tests/05r6-bitmapfile b/tests/05r6-bitmapfile index 28c590e4..d11896db 100644 --- a/tests/05r6-bitmapfile +++ b/tests/05r6-bitmapfile @@ -32,6 +32,7 @@ fi mdadm -S $md0 mdadm --assemble -R $md0 --bitmap=$bmf $dev1 $dev2 $dev4 +mdadm --zero $dev3 # force --add, not --re-add mdadm $md0 --add $dev3 check recovery