summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-05-13 12:22:03 +1000
committerNeilBrown <neilb@suse.de>2014-05-21 11:54:48 +1000
commita34c8836f02c18814f146d3d8b7e415b152ee1ca (patch)
treea0431236fefe99baf716b898b1d36b2149b8b7c0
parent1c2cdb9072fafad7faed9a2de8e50e20e4cf078e (diff)
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 <neilb@suse.de>
-rw-r--r--tests/10ddf-assemble-missing23
1 files 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