summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-08-15 06:14:27 +0000
committerNeil Brown <neilb@suse.de>2005-08-15 06:14:27 +0000
commitdab6685f3d9982b697d938d99737897ea8ac768c (patch)
treef68788b7c36feabc151e96d622dffd44644fbbac /tests
parent7358e196679a5fba3f447c26c7133cba2aa44928 (diff)
downloadmdadm-dab6685f3d9982b697d938d99737897ea8ac768c.tar.gz
mdadm-dab6685f3d9982b697d938d99737897ea8ac768c.tar.xz
mdadm-dab6685f3d9982b697d938d99737897ea8ac768c.zip
Add 'quite' option and tidy up some tests.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/00linear26
-rw-r--r--tests/00raid049
-rw-r--r--tests/00raid140
-rw-r--r--tests/00raid108
-rw-r--r--tests/00raid417
-rw-r--r--tests/00raid533
-rw-r--r--tests/00raid617
-rw-r--r--tests/01r1fail40
-rw-r--r--tests/01r5fail34
-rw-r--r--tests/02r1add52
-rw-r--r--tests/02r1grow48
-rw-r--r--tests/02r5grow50
-rw-r--r--tests/02r6grow48
-rw-r--r--tests/03r0assem89
-rw-r--r--tests/03r5assem60
-rw-r--r--tests/04r0update20
-rw-r--r--tests/04r1update18
-rw-r--r--tests/05r1-bitmapfile40
-rw-r--r--tests/05r1-grow-external22
-rw-r--r--tests/05r1-internalbitmap40
-rw-r--r--tests/05r1-n3-bitmapfile42
-rw-r--r--tests/06name16
-rw-r--r--tests/06r5swap12
-rw-r--r--tests/06wrmostly12
-rw-r--r--tests/testdev2
25 files changed, 413 insertions, 422 deletions
diff --git a/tests/00linear b/tests/00linear
index 9e77569..6f08ba0 100644
--- a/tests/00linear
+++ b/tests/00linear
@@ -1,22 +1,20 @@
# create a simple linear
-set -ex
-$mdadm -CR $md0 -l linear -n3 $dev0 $dev1 $dev2
-$check linear
-sh tests/testdev $md0 3 $mdsize0 64
-$mdadm -S $md0
+mdadm -CR $md0 -l linear -n3 $dev0 $dev1 $dev2
+check linear
+testdev $md0 3 $mdsize0 64
+mdadm -S $md0
# now with verion-1 superblock
-$mdadm -CR $md0 -e1 --level=linear -n4 $dev0 $dev1 $dev2 $dev3
-$check linear
-sh tests/testdev $md0 4 $mdsize1 64
-$mdadm -S $md0
+mdadm -CR $md0 -e1 --level=linear -n4 $dev0 $dev1 $dev2 $dev3
+check linear
+testdev $md0 4 $mdsize1 64
+mdadm -S $md0
# now with no superblock
-$mdadm -B $md0 -l linear -n5 $dev0 $dev1 $dev2 $dev3 $dev4
-$check linear
-sh tests/testdev $md0 5 $size 64
-$mdadm -S $md0
+mdadm -B $md0 -l linear -n5 $dev0 $dev1 $dev2 $dev3 $dev4
+check linear
+testdev $md0 5 $size 64
+mdadm -S $md0
-exit 0
diff --git a/tests/00raid0 b/tests/00raid0
index c5ea9d3..07437c0 100644
--- a/tests/00raid0
+++ b/tests/00raid0
@@ -1,44 +1,43 @@
# create a simple raid0
-set -e
-$mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2
-$check raid0
-sh tests/testdev $md0 3 $mdsize0 64
-$mdadm -S $md0
+mdadm -CR $md0 -l raid0 -n3 $dev0 $dev1 $dev2
+check raid0
+testdev $md0 3 $mdsize0 64
+mdadm -S $md0
# now with verion-1 superblock
-$mdadm -CR $md0 -e1 -l0 -n4 $dev0 $dev1 $dev2 $dev3
-$check raid0
-sh tests/testdev $md0 4 $mdsize1 64
-$mdadm -S $md0
+mdadm -CR $md0 -e1 -l0 -n4 $dev0 $dev1 $dev2 $dev3
+check raid0
+testdev $md0 4 $mdsize1 64
+mdadm -S $md0
# now with no superblock
-$mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
-$check raid0
-sh tests/testdev $md0 5 $size 64
-$mdadm -S $md0
+mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
+check raid0
+testdev $md0 5 $size 64
+mdadm -S $md0
# now same again with different chunk size
for chunk in 4 32 256
do
- $mdadm -CR $md0 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2
- $check raid0
- sh tests/testdev $md0 3 $mdsize0 $chunk
- $mdadm -S $md0
+ mdadm -CR $md0 -l raid0 --chunk $chunk -n3 $dev0 $dev1 $dev2
+ check raid0
+ testdev $md0 3 $mdsize0 $chunk
+ mdadm -S $md0
# now with verion-1 superblock
- $mdadm -CR $md0 -e1 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3
- $check raid0
- sh tests/testdev $md0 4 $mdsize1 $chunk
- $mdadm -S $md0
+ mdadm -CR $md0 -e1 -l0 -c $chunk -n4 $dev0 $dev1 $dev2 $dev3
+ check raid0
+ testdev $md0 4 $mdsize1 $chunk
+ mdadm -S $md0
# now with no superblock
- $mdadm -B $md0 -l0 -n5 --chun=$chunk $dev0 $dev1 $dev2 $dev3 $dev4
- $check raid0
- sh tests/testdev $md0 5 $size $chunk
- $mdadm -S $md0
+ mdadm -B $md0 -l0 -n5 --chun=$chunk $dev0 $dev1 $dev2 $dev3 $dev4
+ check raid0
+ testdev $md0 5 $size $chunk
+ mdadm -S $md0
done
exit 0
diff --git a/tests/00raid1 b/tests/00raid1
index 4ffdbae..01e4241 100644
--- a/tests/00raid1
+++ b/tests/00raid1
@@ -4,32 +4,32 @@
# test resync and recovery.
set -e
-$mdadm -CR $md0 -l 1 -n2 $dev0 $dev1
-$check resync
-$check raid1
-sh tests/testdev $md0 1 $mdsize0 1
-$mdadm -S $md0
+mdadm -CR $md0 -l 1 -n2 $dev0 $dev1
+check resync
+check raid1
+testdev $md0 1 $mdsize0 1
+mdadm -S $md0
# now with verion-1 superblock, spare
-$mdadm -CR $md0 -e1 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2
-$check recovery
-$check raid1
-sh tests/testdev $md0 1 $mdsize1 1
-$mdadm -S $md0
+mdadm -CR $md0 -e1 --level=raid1 -n3 -x2 $dev0 missing missing $dev1 $dev2
+check recovery
+check raid1
+testdev $md0 1 $mdsize1 1
+mdadm -S $md0
# now with no superblock
-$mdadm -B $md0 -l mirror -n2 $dev0 $dev1
-$check resync
-$check raid1
-sh tests/testdev $md0 1 $size 1
-$mdadm -S $md0
+mdadm -B $md0 -l mirror -n2 $dev0 $dev1
+check resync
+check raid1
+testdev $md0 1 $size 1
+mdadm -S $md0
# again, but with no resync
-$mdadm -B $md0 -l 1 --assume-clean -n2 $dev0 $dev1
-$check raid1
-$check nosync
-sh tests/testdev $md0 1 $size 1
-$mdadm -S $md0
+mdadm -B $md0 -l 1 --assume-clean -n2 $dev0 $dev1
+check raid1
+check nosync
+testdev $md0 1 $size 1
+mdadm -S $md0
exit 0
diff --git a/tests/00raid10 b/tests/00raid10
index 12fa9d3..fe781ba 100644
--- a/tests/00raid10
+++ b/tests/00raid10
@@ -12,8 +12,8 @@ do
n2 ) m=3;;
n3 ) m=2;;
esac
- $mdadm --create --run --level=raid10 --layout $lo --raid-disks 6 -x 1 $md0 $devs
- $check resync ; $check raid10
- sh tests/testdev $md0 $m $mdsize0 $[64*cm]
- $mdadm -S $md0
+ mdadm --create --run --level=raid10 --layout $lo --raid-disks 6 -x 1 $md0 $devs
+ check resync ; check raid10
+ testdev $md0 $m $mdsize0 $[64*cm]
+ mdadm -S $md0
done
diff --git a/tests/00raid4 b/tests/00raid4
index a087d63..a45668a 100644
--- a/tests/00raid4
+++ b/tests/00raid4
@@ -1,17 +1,16 @@
# create a simple raid4 set
-set -e
-$mdadm -CfR $md0 -l 4 -n3 $dev0 $dev1 $dev2
-$check resync ; $check raid5
-sh tests/testdev $md0 2 $mdsize0 64
-$mdadm -S $md0
+mdadm -CfR $md0 -l 4 -n3 $dev0 $dev1 $dev2
+check resync ; check raid5
+testdev $md0 2 $mdsize0 64
+mdadm -S $md0
# now with verion-1 superblock
-$mdadm -CR $md0 -e1 --level=raid4 -n4 $dev0 $dev1 $dev2 $dev3
-$check resync; $check raid5
-sh tests/testdev $md0 3 $mdsize1 64
-$mdadm -S $md0
+mdadm -CR $md0 -e1 --level=raid4 -n4 $dev0 $dev1 $dev2 $dev3
+check resync; check raid5
+testdev $md0 3 $mdsize1 64
+mdadm -S $md0
exit 0
diff --git a/tests/00raid5 b/tests/00raid5
index 6ca86e0..7192ac5 100644
--- a/tests/00raid5
+++ b/tests/00raid5
@@ -1,33 +1,32 @@
# create a simple raid5 set
-set -e
-$mdadm -CfR $md0 -l 5 -n3 $dev0 $dev1 $dev2
-$check resync
-sh tests/testdev $md0 2 $mdsize0 64
-$mdadm -S $md0
+mdadm -CfR $md0 -l 5 -n3 $dev0 $dev1 $dev2
+check resync
+testdev $md0 2 $mdsize0 64
+mdadm -S $md0
# now with verion-1 superblock
-$mdadm -CR $md0 -e1 --level=raid5 -n4 $dev0 $dev1 $dev2 $dev3
-$check recovery
-sh tests/testdev $md0 3 $mdsize1 64
-$mdadm -S $md0
+mdadm -CR $md0 -e1 --level=raid5 -n4 $dev0 $dev1 $dev2 $dev3
+check recovery
+testdev $md0 3 $mdsize1 64
+mdadm -S $md0
# now same again with explicit layout
for lo in la ra left-symmetric right-symmetric
do
- $mdadm -CfR $md0 -l 5 -p $lo -n3 $dev0 $dev1 $dev2
- $check resync ; $check raid5
- sh tests/testdev $md0 2 $mdsize0 64
- $mdadm -S $md0
+ mdadm -CfR $md0 -l 5 -p $lo -n3 $dev0 $dev1 $dev2
+ check resync ; check raid5
+ testdev $md0 2 $mdsize0 64
+ mdadm -S $md0
# now with verion-1 superblock
- $mdadm -CR $md0 -e1 --level=raid5 --layout $lo -n4 $dev0 $dev1 $dev2 $dev3
- $check recovery ; $check raid5
- sh tests/testdev $md0 3 $mdsize1 64
- $mdadm -S $md0
+ mdadm -CR $md0 -e1 --level=raid5 --layout $lo -n4 $dev0 $dev1 $dev2 $dev3
+ check recovery ; check raid5
+ testdev $md0 3 $mdsize1 64
+ mdadm -S $md0
done
diff --git a/tests/00raid6 b/tests/00raid6
index 827fdaf..ba8c61c 100644
--- a/tests/00raid6
+++ b/tests/00raid6
@@ -1,17 +1,16 @@
# create a simple raid6 set
-set -e
-$mdadm -CfR $md0 -l 6 -n4 $dev0 $dev1 $dev2 $dev3
-$check resync ; $check raid6
-sh tests/testdev $md0 2 $mdsize0 64
-$mdadm -S $md0
+mdadm -CfR $md0 -l 6 -n4 $dev0 $dev1 $dev2 $dev3
+check resync ; check raid6
+testdev $md0 2 $mdsize0 64
+mdadm -S $md0
# now with verion-1 superblock
-$mdadm -CR $md0 -e1 --level=raid6 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
-$check resync ; $check raid6
-sh tests/testdev $md0 3 $mdsize1 64
-$mdadm -S $md0
+mdadm -CR $md0 -e1 --level=raid6 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
+check resync ; check raid6
+testdev $md0 3 $mdsize1 64
+mdadm -S $md0
exit 0
diff --git a/tests/01r1fail b/tests/01r1fail
index 76488b0..c378663 100644
--- a/tests/01r1fail
+++ b/tests/01r1fail
@@ -1,30 +1,28 @@
-set -e
-
# create a raid1, fail and remove a drive during initial sync
# Add two more, fail and remove one
# wait for sync to complete, fail, remove, re-add
-$mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing
-$check resync
-$mdadm $md0 --fail $dev2
-$check resync
-$mdadm $md0 --fail $dev1
+mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing
+check resync
+mdadm $md0 --fail $dev2
+check resync
+mdadm $md0 --fail $dev1
sleep 1
-$check nosync
-$check state U___
-$mdadm $md0 --add $dev4 $dev3
-$check recovery
+check nosync
+check state U___
+mdadm $md0 --add $dev4 $dev3
+check recovery
# there could be two separate recoveries, one for each dev
-$check wait
-$check wait
-$mdadm $md0 --remove $dev2 $dev1
-$check nosync
-$check state UUU_
+check wait
+check wait
+mdadm $md0 --remove $dev2 $dev1
+check nosync
+check state UUU_
-$mdadm $md0 -a $dev2
-$check recovery
-$check wait
-$check state UUUU
+mdadm $md0 -a $dev2
+check recovery
+check wait
+check state UUUU
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/01r5fail b/tests/01r5fail
index 1aaa597..5c76a0b 100644
--- a/tests/01r5fail
+++ b/tests/01r5fail
@@ -5,23 +5,23 @@ set -e
# Add two more, fail and remove one
# wait for sync to complete, fail, remove, re-add
-$mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3
-$check recovery
-$mdadm $md0 --fail $dev3
-$check nosync
-$check state UUU_
+mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3
+check recovery
+mdadm $md0 --fail $dev3
+check nosync
+check state UUU_
-$mdadm $md0 --add $dev4 $dev5
-$check recovery
-$check wait
-$mdadm $md0 --fail $dev0
-$mdadm $md0 --remove $dev3 $dev0
-$check recovery
-$check state _UUU
+mdadm $md0 --add $dev4 $dev5
+check recovery
+check wait
+mdadm $md0 --fail $dev0
+mdadm $md0 --remove $dev3 $dev0
+check recovery
+check state _UUU
-$mdadm $md0 -a $dev3
-$check recovery
-$check wait
-$check state UUUU
+mdadm $md0 -a $dev3
+check recovery
+check wait
+check state UUUU
-$mdadm -S $md0 \ No newline at end of file
+mdadm -S $md0 \ No newline at end of file
diff --git a/tests/02r1add b/tests/02r1add
index 10507a7..6b2b212 100644
--- a/tests/02r1add
+++ b/tests/02r1add
@@ -2,40 +2,40 @@
set -e
# Make a raid1, add a device, then remove it again.
-$mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2
-$check resync
-$check wait
-$check state UU
+mdadm -CR $md0 -l1 -n2 -x1 $dev0 $dev1 $dev2
+check resync
+check wait
+check state UU
-$mdadm --grow $md0 -n 3
-$check recovery
-$check wait
-$check state UUU
+mdadm --grow $md0 -n 3
+check recovery
+check wait
+check state UUU
-$mdadm $md0 --fail $dev0
-$check state _UU
+mdadm $md0 --fail $dev0
+check state _UU
-$mdadm --grow $md0 -n 2
-$check state UU
+mdadm --grow $md0 -n 2
+check state UU
-$mdadm -S $md0
+mdadm -S $md0
# same again for version-1
-$mdadm -CR $md0 -l1 -n2 -e1.2 -x1 $dev0 $dev1 $dev2
-$check resync
-$check wait
-$check state UU
+mdadm -CR $md0 -l1 -n2 -e1.2 -x1 $dev0 $dev1 $dev2
+check resync
+check wait
+check state UU
-$mdadm --grow $md0 -n 3
-$check recovery
-$check wait
-$check state UUU
+mdadm --grow $md0 -n 3
+check recovery
+check wait
+check state UUU
-$mdadm $md0 --fail $dev0
-$check state _UU
+mdadm $md0 --fail $dev0
+check state _UU
-$mdadm --grow $md0 -n 2
-$check state UU
+mdadm --grow $md0 -n 2
+check state UU
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/02r1grow b/tests/02r1grow
index 95873ea..e789707 100644
--- a/tests/02r1grow
+++ b/tests/02r1grow
@@ -3,35 +3,35 @@ set -e
# create a small raid1 array, make it larger. Then make it smaller
-$mdadm -CR $md0 --level raid1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
-$check wait
-$check state UUU
-sh tests/testdev $md0 1 $[size/2] 1
+mdadm -CR $md0 --level raid1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
+check wait
+check state UUU
+testdev $md0 1 $[size/2] 1
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 1 $mdsize0 1
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 1 $mdsize0 1
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 1 $[size/2] 1
+mdadm --grow $md0 --size $[size/2]
+check nosync
+testdev $md0 1 $[size/2] 1
-$mdadm -S $md0
+mdadm -S $md0
# same again with version 1.1 superblock
-$mdadm -CR $md0 --level raid1 --metadata=1.1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
-$check wait
-$check state UUU
-sh tests/testdev $md0 1 $[size/2] 1
+mdadm -CR $md0 --level raid1 --metadata=1.1 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
+check wait
+check state UUU
+testdev $md0 1 $[size/2] 1
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 1 $[size-1] 1
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 1 $[size-1] 1
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 1 $[size/2] 1
+mdadm --grow $md0 --size $[size/2]
+check nosync
+testdev $md0 1 $[size/2] 1
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/02r5grow b/tests/02r5grow
index 0ac968c..b8de3d4 100644
--- a/tests/02r5grow
+++ b/tests/02r5grow
@@ -3,35 +3,35 @@ set -e
# create a small raid5 array, make it larger. Then make it smaller
-$mdadm -CR $md0 --level raid5 --chunk=32 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
-$check wait
-$check state UUU
-sh tests/testdev $md0 2 $[size/2] 32
+mdadm -CR $md0 --level raid5 --chunk=32 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
+check wait
+check state UUU
+testdev $md0 2 $[size/2] 32
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 2 $mdsize0 64
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 2 $mdsize0 64
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 2 $[size/2] 64
+mdadm --grow $md0 --size $[size/2]
+check nosync
+testdev $md0 2 $[size/2] 64
-$mdadm -S $md0
+mdadm -S $md0
# same again with version 1.1 superblock
-$mdadm -CR $md0 --level raid5 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
-$check wait
-$check state UUUU
+mdadm -CR $md0 --level raid5 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
+check wait
+check state UUUU
+testdev $md0 3 $[size/2] 128
+
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 3 $[size-1] 128
+
+mdadm --grow $md0 --size $[size/2]
+check nosync
sh tests/testdev $md0 3 $[size/2] 128
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 3 $[size-1] 128
-
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 3 $[size/2] 128
-
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/02r6grow b/tests/02r6grow
index ef864e2..6f4cce2 100644
--- a/tests/02r6grow
+++ b/tests/02r6grow
@@ -3,35 +3,35 @@ set -e
# create a small raid6 array, make it larger. Then make it smaller
-$mdadm -CR $md0 --level raid6 --chunk=32 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
-$check wait
-$check state UUUU
-sh tests/testdev $md0 2 $[size/2] 32
+mdadm -CR $md0 --level raid6 --chunk=32 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
+check wait
+check state UUUU
+testdev $md0 2 $[size/2] 32
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 2 $mdsize0 64
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 2 $mdsize0 64
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 2 $[size/2] 64
+mdadm --grow $md0 --size $[size/2]
+check nosync
+testdev $md0 2 $[size/2] 64
-$mdadm -S $md0
+mdadm -S $md0
# same again with version 1.1 superblock
-$mdadm -CR $md0 --level raid6 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
-$check wait
-$check state UUUU
-sh tests/testdev $md0 2 $[size/2] 128
+mdadm -CR $md0 --level raid6 --metadata=1.1 --chunk=128 --raid-disks 4 --size $[size/2] $dev1 $dev2 $dev3 $dev4
+check wait
+check state UUUU
+testdev $md0 2 $[size/2] 128
-$mdadm --grow $md0 --size max
-$check resync
-$check wait
-sh tests/testdev $md0 2 $[size-1] 128
+mdadm --grow $md0 --size max
+check resync
+check wait
+testdev $md0 2 $[size-1] 128
-$mdadm --grow $md0 --size $[size/2]
-$check nosync
-sh tests/testdev $md0 2 $[size/2] 128
+mdadm --grow $md0 --size $[size/2]
+check nosync
+testdev $md0 2 $[size/2] 128
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/03r0assem b/tests/03r0assem
index 96da6a5..0d53901 100644
--- a/tests/03r0assem
+++ b/tests/03r0assem
@@ -1,28 +1,27 @@
-set -e
# create a raid0 array from 3 devices, and assemble it in a multitude of ways.
# explicitly list devices
# uuid, md-minor on command line with wildcard devices
# mdadm.conf file
-$mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2
-$check raid0
-tst="sh tests/testdev $md2 3 $mdsize0 64"
+mdadm -CR $md2 -l0 -n3 $dev0 $dev1 $dev2
+check raid0
+tst="testdev $md2 3 $mdsize0 64"
$tst
-uuid=`$mdadm -Db $md2 | sed 's/.*UUID=//'`
-$mdadm -S $md2
+uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'`
+mdadm -S $md2
-$mdadm -A $md2 $dev0 $dev1 $dev2
+mdadm -A $md2 $dev0 $dev1 $dev2
$tst
-$mdadm -S $md2
+mdadm -S $md2
-$mdadm -A $md2 -u $uuid $devlist
+mdadm -A $md2 -u $uuid $devlist
$tst
-$mdadm -S $md2
+mdadm -S $md2
-$mdadm --assemble $md2 --super-minor=2 $devlist
+mdadm --assemble $md2 --super-minor=2 $devlist
$tst
-$mdadm -S $md2
+mdadm -S $md2
conf=$targetdir/mdadm.conf
{
@@ -30,18 +29,18 @@ conf=$targetdir/mdadm.conf
echo array $md2 UUID=$uuid
} > $conf
-$mdadm -As -c $conf $md2
+mdadm -As -c $conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
{
echo DEVICE $devlist
echo array $md2 super-minor=2
} > $conf
-$mdadm -As -c $conf $md2
+mdadm -As -c $conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
{
@@ -49,46 +48,46 @@ $mdadm -S $md2
echo array $md2 devices=$dev0,$dev1,$dev2
} > $conf
-$mdadm -As -c $conf $md2
+mdadm -As -c $conf $md2
$tst
echo "DEVICE $devlist" > $conf
-$mdadm -Db $md2 >> $conf
-$mdadm -S $md2
+mdadm -Db $md2 >> $conf
+mdadm -S $md2
-$mdadm --assemble --scan --config=$conf $md2
+mdadm --assemble --scan --config=$conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
-$mdadm --assemble --scan --config=$conf $md2
+mdadm --assemble --scan --config=$conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
### Now for version 1...
-$mdadm -CR $md2 -l0 --metadata=1.0 -n3 $dev0 $dev1 $dev2
-$check raid0
-tst="sh tests/testdev $md2 3 $mdsize1 64"
+mdadm -CR $md2 -l0 --metadata=1.0 -n3 $dev0 $dev1 $dev2
+check raid0
+tst="testdev $md2 3 $mdsize1 64"
$tst
-uuid=`$mdadm -Db $md2 | sed 's/.*UUID=//'`
-$mdadm -S $md2
+uuid=`mdadm -Db $md2 | sed 's/.*UUID=//'`
+mdadm -S $md2
-$mdadm -A $md2 $dev0 $dev1 $dev2
+mdadm -A $md2 $dev0 $dev1 $dev2
$tst
-$mdadm -S $md2
+mdadm -S $md2
-$mdadm -A $md2 -u $uuid $devlist
+mdadm -A $md2 -u $uuid $devlist
$tst
-$mdadm -S $md2
+mdadm -S $md2
# version 1 has now super-minor
-# $mdadm --assemble $md2 --super-minor=2 $devlist #
+# mdadm --assemble $md2 --super-minor=2 $devlist #
# $tst
-# $mdadm -S $md2
+# mdadm -S $md2
conf=$targetdir/mdadm.conf
{
@@ -96,18 +95,18 @@ conf=$targetdir/mdadm.conf
echo array $md2 UUID=$uuid
} > $conf
-$mdadm -As -c $conf $md2
+mdadm -As -c $conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
#{
# echo DEVICE $devlist
# echo array $md2 super-minor=2
#} > $conf
#
-#$mdadm -As -c $conf $md2
+#mdadm -As -c $conf $md2
#$tst
-#$mdadm -S $md2
+#mdadm -S $md2
{
@@ -115,18 +114,18 @@ $mdadm -S $md2
echo array $md2 devices=$dev0,$dev1,$dev2
} > $conf
-$mdadm -As -c $conf $md2
+mdadm -As -c $conf $md2
$tst
echo "DEVICE $devlist" > $conf
-$mdadm -Db $md2 >> $conf
-$mdadm -S $md2
+mdadm -Db $md2 >> $conf
+mdadm -S $md2
-$mdadm --assemble --scan --config=$conf $md2
+mdadm --assemble --scan --config=$conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
echo " metadata=1 devices=$dev0,$dev1,$dev2" >> $conf
-$mdadm --assemble --scan --config=$conf $md2
+mdadm --assemble --scan --config=$conf $md2
$tst
-$mdadm -S $md2
+mdadm -S $md2
diff --git a/tests/03r5assem b/tests/03r5assem
index 5ca5ddd..b2b0698 100644
--- a/tests/03r5assem
+++ b/tests/03r5assem
@@ -3,19 +3,19 @@ set -e
# create a raid5 array and assemble it in various ways,
# including with missing devices.
-$mdadm -CR $md1 -l5 -n3 $dev0 $dev1 $dev2
-tst="$check raid5 ;sh tests/testdev $md1 2 $mdsize0 64 ; $mdadm -S $md1"
-uuid=`$mdadm -Db $md1 | sed 's/.*UUID=//'`
-$check wait
+mdadm -CR $md1 -l5 -n3 $dev0 $dev1 $dev2
+tst="check raid5 ;testdev $md1 2 $mdsize0 64 ; mdadm -S $md1"
+uuid=`mdadm -Db $md1 | sed 's/.*UUID=//'`
+check wait
eval $tst
-$mdadm -A $md1 $dev0 $dev1 $dev2
+mdadm -A $md1 $dev0 $dev1 $dev2
eval $tst
-$mdadm -A $md1 -u $uuid $devlist
+mdadm -A $md1 -u $uuid $devlist
eval $tst
-$mdadm -A $md1 -m 1 $devlist
+mdadm -A $md1 -m 1 $devlist
eval $tst
@@ -25,7 +25,7 @@ conf=$targetdir/mdadm.conf
echo array $md1 UUID=$uuid
} > $conf
-$mdadm -As -c $conf $md1
+mdadm -As -c $conf $md1
eval $tst
{
@@ -33,7 +33,7 @@ eval $tst
echo array $md1 super-minor=1
} > $conf
-$mdadm -As -c $conf
+mdadm -As -c $conf
eval $tst
{
@@ -41,31 +41,31 @@ eval $tst
echo array $md1 devices=$dev0,$dev1,$dev2
} > $conf
-$mdadm -As -c $conf
+mdadm -As -c $conf
echo "DEVICE $devlist" > $conf
-$mdadm -Db $md1 >> $conf
+mdadm -Db $md1 >> $conf
eval $tst
-$mdadm --assemble --scan --config=$conf $md1
+mdadm --assemble --scan --config=$conf $md1
eval $tst
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
-$mdadm --assemble --scan --config=$conf $md1
+mdadm --assemble --scan --config=$conf $md1
eval $tst
### Now with a missing device
-$mdadm -AR $md1 $dev0 $dev2 #
-$check state U_U
+mdadm -AR $md1 $dev0 $dev2 #
+check state U_U
eval $tst
-$mdadm -A $md1 -u $uuid $devlist
-$check state U_U
+mdadm -A $md1 -u $uuid $devlist
+check state U_U
eval $tst
-$mdadm -A $md1 -m 1 $devlist
-$check state U_U
+mdadm -A $md1 -m 1 $devlist
+check state U_U
eval $tst
@@ -75,8 +75,8 @@ conf=$targetdir/mdadm.conf
echo array $md1 UUID=$uuid
} > $conf
-$mdadm -As -c $conf $md1
-$check state U_U
+mdadm -As -c $conf $md1
+check state U_U
eval $tst
{
@@ -84,8 +84,8 @@ eval $tst
echo array $md1 super-minor=1
} > $conf
-$mdadm -As -c $conf
-$check state U_U
+mdadm -As -c $conf
+check state U_U
eval $tst
{
@@ -93,18 +93,18 @@ eval $tst
echo array $md1 devices=$dev0,$dev1,$dev2
} > $conf
-$mdadm -As -c $conf
+mdadm -As -c $conf
echo "DEVICE $devlist" > $conf
-$mdadm -Db $md1 >> $conf
-$check state U_U
+mdadm -Db $md1 >> $conf
+check state U_U
eval $tst
-$mdadm --assemble --scan --config=$conf $md1
-$check state U_U
+mdadm --assemble --scan --config=$conf $md1
+check state U_U
eval $tst
echo " metadata=0.90 devices=$dev0,$dev1,$dev2" >> $conf
-$mdadm --assemble --scan --config=$conf $md1
-$check state U_U
+mdadm --assemble --scan --config=$conf $md1
+check state U_U
eval $tst
diff --git a/tests/04r0update b/tests/04r0update
index 73ecbd5..2a6939d 100644
--- a/tests/04r0update
+++ b/tests/04r0update
@@ -1,18 +1,18 @@
set -e
# create a raid0, re-assemble with a different super-minor
-$mdadm -CR $md0 -l0 -n3 $dev0 $dev1 $dev2
-sh tests/testdev $md0 3 $mdsize0 64
-minor1=`$mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-$mdadm -S /dev/md0
+mdadm -CR $md0 -l0 -n3 $dev0 $dev1 $dev2
+testdev $md0 3 $mdsize0 64
+minor1=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
+mdadm -S /dev/md0
-$mdadm -A $md1 $dev0 $dev1 $dev2
-minor2=`$mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-$mdadm -S /dev/md1
+mdadm -A $md1 $dev0 $dev1 $dev2
+minor2=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
+mdadm -S /dev/md1
-$mdadm -A $md1 --update=super-minor $dev0 $dev1 $dev2
-minor3=`$mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
-$mdadm -S /dev/md1
+mdadm -A $md1 --update=super-minor $dev0 $dev1 $dev2
+minor3=`mdadm -E $dev0 | sed -n -e 's/.*Preferred Minor : //p'`
+mdadm -S /dev/md1
case "$minor1 $minor2 $minor3" in
"0 0 1" ) ;;
diff --git a/tests/04r1update b/tests/04r1update
index e76df89..7a50131 100644
--- a/tests/04r1update
+++ b/tests/04r1update
@@ -2,14 +2,14 @@ set -i
# create a raid1 array, let it sync, then re-assemble with a force-sync
-$mdadm -CR $md0 -l1 -n2 $dev0 $dev1
-$check wait
-$mdadm -S $md0
+mdadm -CR $md0 -l1 -n2 $dev0 $dev1
+check wait
+mdadm -S $md0
-$mdadm -A $md0 $dev0 $dev1
-$check nosync
-$mdadm -S $md0
+mdadm -A $md0 $dev0 $dev1
+check nosync
+mdadm -S $md0
-$mdadm -A $md0 -U resync $dev0 $dev1
-$check resync
-$mdadm -S $md0
+mdadm -A $md0 -U resync $dev0 $dev1
+check resync
+mdadm -S $md0
diff --git a/tests/05r1-bitmapfile b/tests/05r1-bitmapfile
index 777c467..ac952c2 100644
--- a/tests/05r1-bitmapfile
+++ b/tests/05r1-bitmapfile
@@ -5,45 +5,45 @@ set -e
#
bmf=$targetdir/bitmap
rm -f $bmf
-$mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2
-$check wait
-sh tests/testdev $md0 1 $mdsize0 1
-$mdadm -S $md0
-
-$mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2
-sh tests/testdev $md0 1 $mdsize0 1
-dirty1=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap $bmf $dev1 $dev2
+check wait
+testdev $md0 1 $mdsize0 1
+mdadm -S $md0
+
+mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2
+testdev $md0 1 $mdsize0 1
+dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
sleep 4
-dirty2=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty1 -lt 400 -o $dirty2 -ne 0 ]
then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2"
exit 1
fi
-$mdadm $md0 -f $dev1
-sh tests/testdev $md0 1 $mdsize0 1
+mdadm $md0 -f $dev1
+testdev $md0 1 $mdsize0 1
sleep 4
-dirty3=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ]
then
echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2
fi
-$mdadm -S $md0
+mdadm -S $md0
-$mdadm --assemble -R $md0 --bitmap=$bmf $dev2
-$mdadm $md0 --add $dev1
-$check recovery
+mdadm --assemble -R $md0 --bitmap=$bmf $dev2
+mdadm $md0 --add $dev1
+check recovery
-dirty4=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
-$check wait
+dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+check wait
sleep 4
-dirty5=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty5=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty4 -lt 400 -o $dirty5 -ne 0 ]
then echo echo >&2 "ERROR bad 'dirty' counts at end: $dirty4 $dirty5"
exit 1
fi
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/05r1-grow-external b/tests/05r1-grow-external
index 5954833..072dc3c 100644
--- a/tests/05r1-grow-external
+++ b/tests/05r1-grow-external
@@ -3,22 +3,22 @@ set -e
#
# create a raid1 array, add an external bitmap
#
-$mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2
-$check wait
-sh tests/testdev $md0 1 $mdsize0 1
+mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2
+check wait
+testdev $md0 1 $mdsize0 1
bmf=$targetdir/bm
rm -f $bmf
-$mdadm -E $dev1
-$mdadm --grow $md0 --bitmap=$bmf --delay=1 || { $mdadm -X $bmf ; exit 1; }
-dirty1=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+mdadm -E $dev1
+mdadm --grow $md0 --bitmap=$bmf --delay=1 || { $mdadm -X $bmf ; exit 1; }
+dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
sleep 4
-dirty2=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
-sh tests/testdev $md0 1 $mdsize0 1
-dirty3=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+testdev $md0 1 $mdsize0 1
+dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
sleep 4
-dirty4=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
echo $dirty1 $dirty2 $dirty3 $dirty4
if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ]
@@ -26,4 +26,4 @@ then
echo bad dirty counts
exit 1
fi
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/05r1-internalbitmap b/tests/05r1-internalbitmap
index 9e15c10..0f8a43a 100644
--- a/tests/05r1-internalbitmap
+++ b/tests/05r1-internalbitmap
@@ -3,45 +3,45 @@ set -e
#
# create a raid1 with an internal bitmap
#
-$mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap internal $dev1 $dev2
-$check wait
-sh tests/testdev $md0 1 $mdsize0 1
-$mdadm -S $md0
-
-$mdadm --assemble $md0 $dev1 $dev2
-sh tests/testdev $md0 1 $mdsize0 1
-dirty1=`$mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+mdadm --create --run $md0 --level=1 -n2 --delay=1 --bitmap internal $dev1 $dev2
+check wait
+testdev $md0 1 $mdsize0 1
+mdadm -S $md0
+
+mdadm --assemble $md0 $dev1 $dev2
+testdev $md0 1 $mdsize0 1
+dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
sleep 4
-dirty2=`$mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty1 -lt 400 -o $dirty2 -ne 0 ]
then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2"
exit 1
fi
-$mdadm $md0 -f $dev1
-sh tests/testdev $md0 1 $mdsize0 1
+mdadm $md0 -f $dev1
+testdev $md0 1 $mdsize0 1
sleep 4
-dirty3=`$mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ]
then
echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2
fi
-$mdadm -S $md0
+mdadm -S $md0
-$mdadm --assemble -R $md0 $dev2
-$mdadm $md0 --add $dev1
-$check recovery
+mdadm --assemble -R $md0 $dev2
+mdadm $md0 --add $dev1
+check recovery
-dirty4=`$mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
-$check wait
+dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+check wait
sleep 4
-dirty5=`$mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty5=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty4 -lt 400 -o $dirty5 -ne 0 ]
then echo echo >&2 "ERROR bad 'dirty' counts at end: $dirty4 $dirty5"
exit 1
fi
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/05r1-n3-bitmapfile b/tests/05r1-n3-bitmapfile
index 72d2e08..ec72dec 100644
--- a/tests/05r1-n3-bitmapfile
+++ b/tests/05r1-n3-bitmapfile
@@ -7,47 +7,47 @@ set -e
#
bmf=$targetdir/bitmap
rm -f $bmf
-$mdadm --create --run $md0 --level=1 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3
-$check wait
-sh tests/testdev $md0 1 $mdsize0 1
-$mdadm -S $md0
-
-$mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 $dev3
-sh tests/testdev $md0 1 $mdsize0 1
-dirty1=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+mdadm --create --run $md0 --level=1 -n3 --delay=1 --bitmap $bmf $dev1 $dev2 $dev3
+check wait
+testdev $md0 1 $mdsize0 1
+mdadm -S $md0
+
+mdadm --assemble $md0 --bitmap=$bmf $dev1 $dev2 $dev3
+testdev $md0 1 $mdsize0 1
+dirty1=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
sleep 4
-dirty2=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty2=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty1 -lt 400 -o $dirty2 -ne 0 ]
then echo >&2 "ERROR bad 'dirty' counts: $dirty1 and $dirty2"
exit 1
fi
-$mdadm $md0 -f $dev2
-sh tests/testdev $md0 1 $mdsize0 1
+mdadm $md0 -f $dev2
+testdev $md0 1 $mdsize0 1
sleep 4
-dirty3=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty3=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty3 -lt 400 ]
then
echo >&2 "ERROR dirty count $dirty3 is too small"
exit 2
fi
-$mdadm -S $md0
+mdadm -S $md0
-$mdadm --assemble -R $md0 --bitmap=$bmf $dev1 $dev3
-$check nosync
-$mdadm $md0 --add $dev2
-$check recovery
+mdadm --assemble -R $md0 --bitmap=$bmf $dev1 $dev3
+check nosync
+mdadm $md0 --add $dev2
+check recovery
-dirty4=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
-$check wait
+dirty4=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+check wait
sleep 4
-dirty5=`$mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
+dirty5=`mdadm -X $bmf | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty4 -lt 400 -o $dirty5 -ne 0 ]
then echo echo >&2 "ERROR bad 'dirty' counts at end: $dirty4 $dirty5"
exit 1
fi
-$mdadm -S $md0
+mdadm -S $md0
exit 0
diff --git a/tests/06name b/tests/06name
index 80842ab..cbcd094 100644
--- a/tests/06name
+++ b/tests/06name
@@ -2,12 +2,12 @@ set -x
# create an array with a name
-$mdadm -CR $md0 -l0 -n2 --metadata=1 --name="Fred" $dev0 $dev1
-$mdadm -E $dev0 | grep 'Name : Fred$' > /dev/null || exit 1
-$mdadm -D $md0 | grep 'Name : Fred$' > /dev/null || exit 1
-$mdadm -S $md0
-
-$mdadm -A $md0 --name="Fred" $devlist
-$mdadm -Db $md0
-$mdadm -S $md0
+mdadm -CR $md0 -l0 -n2 --metadata=1 --name="Fred" $dev0 $dev1
+mdadm -E $dev0 | grep 'Name : Fred$' > /dev/null || exit 1
+mdadm -D $md0 | grep 'Name : Fred$' > /dev/null || exit 1
+mdadm -S $md0
+
+mdadm -A $md0 --name="Fred" $devlist
+mdadm -Db $md0
+mdadm -S $md0
diff --git a/tests/06r5swap b/tests/06r5swap
index df5d8b9..e3aaa64 100644
--- a/tests/06r5swap
+++ b/tests/06r5swap
@@ -2,18 +2,18 @@ set -e
# make a raid5 array, byte swap the superblocks, then assemble...
-$mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3
+mdadm -CR $md0 -l5 -n4 $dev0 $dev1 $dev2 $dev3
sleep 4
-$mdadm -S $md0
+mdadm -S $md0
-$mdadm -E --metadata=0 $dev1 | grep -v Events > $targetdir/d1
+mdadm -E --metadata=0 $dev1 | grep -v Events > $targetdir/d1
for d in $dev0 $dev1 $dev2 $dev3
do $dir/swap_super $d
done
-$mdadm -E --metadata=0.swap $dev1 | grep -v Events > $targetdir/d1s
+mdadm -E --metadata=0.swap $dev1 | grep -v Events > $targetdir/d1s
diff -u $targetdir/d1 $targetdir/d1s
-$mdadm --assemble --update=byteorder $md0 $dev0 $dev1 $dev2 $dev3
+mdadm --assemble --update=byteorder $md0 $dev0 $dev1 $dev2 $dev3
sleep 3
cat /proc/mdstat
-$mdadm -S $md0
+mdadm -S $md0
diff --git a/tests/06wrmostly b/tests/06wrmostly
index 51fff60..929610c 100644
--- a/tests/06wrmostly
+++ b/tests/06wrmostly
@@ -2,14 +2,14 @@ set -e
# create a raid1 array with a wrmostly device
-$mdadm -CR $md0 -l1 -n3 $dev0 $dev1 --write-mostly $dev2
-sh tests/testdev $md0 1 $mdsize0 64
+mdadm -CR $md0 -l1 -n3 $dev0 $dev1 --write-mostly $dev2
+testdev $md0 1 $mdsize0 64
# unfortunately, we cannot measure if any read requests are going to $dev2
-$mdadm -S $md0
+mdadm -S $md0
-$mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal $dev0 $dev1 --write-mostly $dev2
-sh tests/testdev $md0 1 $mdsize0 64
-$mdadm -S $md0
+mdadm -CR $md0 -l1 -n3 --write-behind --bitmap=internal $dev0 $dev1 --write-mostly $dev2
+testdev $md0 1 $mdsize0 64
+mdadm -S $md0
diff --git a/tests/testdev b/tests/testdev
index 9e490f9..a3b755e 100644
--- a/tests/testdev
+++ b/tests/testdev
@@ -2,7 +2,7 @@ dev=$1
cnt=$2
size=$3
chunk=$4
-mkfs -j $dev > /dev/null 2>&1 && fsck -fn $dev
+mkfs -j $dev > /dev/null 2>&1 && fsck -fn $dev >&2
dsize=$[size/chunk]
dsize=$[dsize*chunk]
rasize=$[dsize*1024*cnt]