From: NeilBrown Date: Tue, 13 May 2014 02:22:03 +0000 (+1000) Subject: tests: handle change to DDF assembly. X-Git-Tag: mdadm-3.3.1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34c8836f02c18814f146d3d8b7e415b152ee1ca;p=thirdparty%2Fmdadm.git tests: handle change to DDF assembly. 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 --- diff --git a/tests/10ddf-assemble-missing b/tests/10ddf-assemble-missing index e36843f8..17f17244 100644 --- a/tests/10ddf-assemble-missing +++ b/tests/10ddf-assemble-missing @@ -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