summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/07autoassemble1
-rw-r--r--tests/07reshape5intr33
-rw-r--r--tests/07testreshape54
3 files changed, 36 insertions, 2 deletions
diff --git a/tests/07autoassemble b/tests/07autoassemble
index 4496476..bdbc5d3 100644
--- a/tests/07autoassemble
+++ b/tests/07autoassemble
@@ -21,3 +21,4 @@ mdadm -Ss
mdadm -As -c /dev/null --homehost=testing -vvv
testdev $md1 1 $mdsize0 64
testdev $md0 1 $[mdsize0+mdsize00] 64
+mdadm -Ss
diff --git a/tests/07reshape5intr b/tests/07reshape5intr
new file mode 100644
index 0000000..96c8e02
--- /dev/null
+++ b/tests/07reshape5intr
@@ -0,0 +1,33 @@
+
+#
+# test interrupting and restartign raid5 reshape.
+set -x
+devs="$dev1"
+st=UU
+for disks in 2 3 4 5
+do
+ eval devs=\"$devs \$dev$disks\"
+ st=U$st
+ for d in $devs
+ do dd if=/dev/urandom of=$d bs=1024 || true
+ done
+
+ mdadm -CR $md0 -amd -l5 -n$disks --assume-clean $devs
+ mdadm $md0 --add $dev6
+ echo 20 > /proc/sys/dev/raid/speed_limit_max
+ mdadm --grow $md0 -n $[disks+1]
+ check reshape
+ check state $st
+ mdadm --stop $md0
+ mdadm --assemble $md0 $devs $dev6
+ check reshape
+ echo 2000 > /proc/sys/dev/raid/speed_limit_max
+ check wait
+ echo check > /sys/block/md0/md/sync_action
+ check wait
+ mm=`cat /sys/block/md0/md/mismatch_cnt`
+ if [ $mm -gt 0 ]
+ then echo >&2 "ERROR mismatch_cnt non-zero : $mm" ; exit 1
+ fi
+ mdadm -S $md0
+done
diff --git a/tests/07testreshape5 b/tests/07testreshape5
index 8f56a72..44d5ddc 100644
--- a/tests/07testreshape5
+++ b/tests/07testreshape5
@@ -20,7 +20,7 @@ do
# test restore: make a raid5 from a file, then do a compare
dd if=/dev/urandom of=/tmp/RandFile bs=1024 count=$size
$dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
- $mdadm -CR $md0 -amd -l5 -n$disks --assume-clean -c $chunk -p $layout $devs
+ mdadm -CR $md0 -amd -l5 -n$disks --assume-clean -c $chunk -p $layout $devs
cmp -s -n $[size*1024] $md0 /tmp/RandFile || { echo cmp failed ; exit 2; }
# FIXME check parity
@@ -30,7 +30,7 @@ do
> /tmp/NewRand
$dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
cmp -s -n $[size*1024] $md0 /tmp/NewRand || { echo cmp failed ; exit 2; }
- $mdadm -S $md0
+ mdadm -S $md0
done
done
done