summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-06-27 08:11:40 +0200
committerNeil Brown <neilb@suse.de>2008-06-27 08:11:40 +0200
commitbfd8831d1a20b3065c39a5f88fe86faef51b7800 (patch)
treeaeaf859e8a3b3f9e28275c3d0aa0df5b2bf9f016
parentAdd test for stoping and restarting a raid5 reshape. (diff)
downloadmdadm-bfd8831d1a20b3065c39a5f88fe86faef51b7800.tar.xz
mdadm-bfd8831d1a20b3065c39a5f88fe86faef51b7800.zip
Some more cleanup of tests.
Don't use '$mdadm', just 'mdadm'. And --stop all arrays when finished.
-rw-r--r--tests/07autoassemble1
-rw-r--r--tests/07reshape5intr12
-rw-r--r--tests/07testreshape54
3 files changed, 9 insertions, 8 deletions
diff --git a/tests/07autoassemble b/tests/07autoassemble
index 44964764..bdbc5d34 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
index e2a3560c..96c8e02e 100644
--- a/tests/07reshape5intr
+++ b/tests/07reshape5intr
@@ -12,14 +12,14 @@ do
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
+ 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]
+ mdadm --grow $md0 -n $[disks+1]
check reshape
check state $st
- $mdadm --stop $md0
- $mdadm --assemble $md0 $devs $dev6
+ mdadm --stop $md0
+ mdadm --assemble $md0 $devs $dev6
check reshape
echo 2000 > /proc/sys/dev/raid/speed_limit_max
check wait
@@ -29,5 +29,5 @@ do
if [ $mm -gt 0 ]
then echo >&2 "ERROR mismatch_cnt non-zero : $mm" ; exit 1
fi
- $mdadm -S $md0
+ mdadm -S $md0
done
diff --git a/tests/07testreshape5 b/tests/07testreshape5
index 8f56a72f..44d5ddc0 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