diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-12-20 08:48:44 +0000 |
commit | 489bea7ee8e1dbecfa517b8415568044ab57c73a (patch) | |
tree | 44d4878d4c7da3f4908ea9a765ef9b8f9c141756 /tests/07testreshape5 |
mdadm (3.3.2-5) unstable; urgency=medium
* use-tempnode-not-devnode.patch: change udev rules file to use
$tempnode which works both on wheezy and jessie udev, instead
of $devnode which only works in jessie. At this stage it is
better to make rules file compatible with old version instead
of adding versioned dependency. Should be removed for jessie+1.
(Closes: #770883)
* fix Closes: list in previous entry (Closes: #771852)
# imported from the archive
Diffstat (limited to 'tests/07testreshape5')
-rw-r--r-- | tests/07testreshape5 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/07testreshape5 b/tests/07testreshape5 new file mode 100644 index 00000000..0e1f25f9 --- /dev/null +++ b/tests/07testreshape5 @@ -0,0 +1,45 @@ + +# +# test the reshape code by using test_reshape and the +# kernel md code to move data into and out of variously +# 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-(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] $level $nlayout 0 $[size*1024] $devs + mdadm -CR -e 1.0 $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; sync + > /tmp/NewRand + $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 |