From a34c8836f02c18814f146d3d8b7e415b152ee1ca Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Tue, 13 May 2014 12:22:03 +1000 Subject: [PATCH] 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 --- tests/10ddf-assemble-missing | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) 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 -- 2.39.2