summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-10-12 16:55:05 +1100
committerNeilBrown <neilb@suse.de>2009-10-12 16:55:05 +1100
commit249887eb76d984d7a0053dfc79cd917880e883de (patch)
tree08465d1e7ed230ee92b5e15ab195553445573c11 /tests
parentca4f89a3b76187dcd7ca897035a8e92ab67b252d (diff)
downloadmdadm-249887eb76d984d7a0053dfc79cd917880e883de.tar.gz
mdadm-249887eb76d984d7a0053dfc79cd917880e883de.tar.xz
mdadm-249887eb76d984d7a0053dfc79cd917880e883de.zip
testreshape5 - add tests for RAID6
.. to make sure our raid6 calculations are working. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/07testreshape517
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/07testreshape5 b/tests/07testreshape5
index 0360988..7c2bfc1 100644
--- a/tests/07testreshape5
+++ b/tests/07testreshape5
@@ -5,35 +5,42 @@
# shaped md arrays.
set -x
layouts=(la ra ls rs)
+for level in 5 6
+do
for chunk in 4 8 16 32 64 128
do
devs="$dev1"
for disks in 2 3 4 5 6
do
eval devs=\"$devs \$dev$disks\"
+ if [ " $level $disks" = " 6 3" -o " $level $disks" = " 6 2" ]
+ then continue
+ fi
for nlayout in 0 1 2 3
do
layout=${layouts[$nlayout]}
- size=$[chunk*(disks-1)*disks]
+ size=$[chunk*(disks-(level-4))*disks]
# 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
+ $dir/test_stripe restore /tmp/RandFile $disks $[chunk*1024] $level $nlayout 0 $[size*1024] $devs
+ mdadm -CR $md0 -amd -l$level -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
# test save
dd if=/dev/urandom of=$md0 bs=1024 count=$size
- blockdev --flushbufs $md0 $devs
+ blockdev --flushbufs $md0 $devs; sync
> /tmp/NewRand
- $dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] 5 $nlayout 0 $[size*1024] $devs
+ $dir/test_stripe save /tmp/NewRand $disks $[chunk*1024] $level $nlayout 0 $[size*1024] $devs
cmp -s -n $[size*1024] $md0 /tmp/NewRand || { echo cmp failed ; exit 2; }
mdadm -S $md0
+ udevadm settle
done
done
done
+done
exit 0