]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
tests: handle change to DDF assembly.
authorNeilBrown <neilb@suse.de>
Tue, 13 May 2014 02:22:03 +0000 (12:22 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 21 May 2014 01:54:48 +0000 (11:54 +1000)
When a DDF array is assembled with missing devices, those devices
are now alway marked as 'missing' and cannot just re-appear in the array
and be working again.

test must be changed to acknowledge this.

Signed-off-by: NeilBrown <neilb@suse.de>
tests/10ddf-assemble-missing

index e36843f8dd91b74292c6637589868b19422392d8..17f17244292e891898cc682f96d0f1edf2ddcaac 100644 (file)
@@ -1,6 +1,6 @@
 # An array is assembled incompletely.
-# The previously missing disks are then added again.
-# Nothing is written, so this should work cleanly.
+# Re missing disks get marked as missing and are not allowed back in
+
 . tests/env-ddf-template
 tmp=$(mktemp /tmp/mdtest-XXXXXX)
 rm -f $tmp /var/tmp/mdmon.log
@@ -36,15 +36,18 @@ done
 mdadm -Ss
 
 # Expect consistent state
-for d in $dev10 $dev8; do
+for d in $dev10 $dev11; do
     mdadm -E $d>$tmp
-    for x in 0 1; do
-       egrep 'state\['$x'\] : Optimal, Consistent' $tmp || {
-           ret=1
-           echo ERROR: $member0 has unexpected state on $d
-       }
-    done
-    if [ x$(egrep -c 'active/Online$' $tmp) != x4 ]; then
+    egrep 'state\[0\] : Degraded, Consistent' $tmp || {
+        ret=1
+        echo ERROR: $member0 has unexpected state on $d
+    }
+    egrep 'state\[1\] : Optimal, Consistent' $tmp || {
+        ret=1
+        echo ERROR: $member1 has unexpected state on $d
+    }
+
+    if [ x$(egrep -c 'active/Online$' $tmp) != x2 ]; then
        ret=1
        echo ERROR: unexpected number of online disks on $d
     fi