test: add --disable-integrity switch.
The integrity tests are very slow and aren't always needed. So make them optional. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
cb8f6859d1
commit
bde085f411
5
test
5
test
|
@ -26,6 +26,7 @@ modprobe multipath 2> /dev/null
|
||||||
if grep -s 'Personalities : .*multipath' > /dev/null /proc/mdstat ; then
|
if grep -s 'Personalities : .*multipath' > /dev/null /proc/mdstat ; then
|
||||||
MULTIPATH="yes"
|
MULTIPATH="yes"
|
||||||
fi
|
fi
|
||||||
|
INTEGRITY=yes
|
||||||
|
|
||||||
# assume md0, md1, md2 exist in /dev
|
# assume md0, md1, md2 exist in /dev
|
||||||
md0=/dev/md0 md1=/dev/md1 md2=/dev/md2
|
md0=/dev/md0 md1=/dev/md1 md2=/dev/md2
|
||||||
|
@ -254,6 +255,7 @@ do_help() {
|
||||||
echo " Options:"
|
echo " Options:"
|
||||||
echo " --tests=<test1,test2,..> Comma separated list of tests to run"
|
echo " --tests=<test1,test2,..> Comma separated list of tests to run"
|
||||||
echo " --disable-multipath Disable any tests involving multipath"
|
echo " --disable-multipath Disable any tests involving multipath"
|
||||||
|
echo " --disable-integrity Disable slow tests of RAID[56] consistency"
|
||||||
echo " --logdir=<directory> Directory to save logfiles in"
|
echo " --logdir=<directory> Directory to save logfiles in"
|
||||||
echo " --save-logs Save all logs in <logdir>"
|
echo " --save-logs Save all logs in <logdir>"
|
||||||
echo " --keep-going Don't stop on error, ie. run all tests"
|
echo " --keep-going Don't stop on error, ie. run all tests"
|
||||||
|
@ -299,6 +301,9 @@ parse_args() {
|
||||||
--disable-multipath)
|
--disable-multipath)
|
||||||
unset MULTIPATH
|
unset MULTIPATH
|
||||||
;;
|
;;
|
||||||
|
--disable-integrity)
|
||||||
|
unset INTEGRITY
|
||||||
|
;;
|
||||||
--help)
|
--help)
|
||||||
do_help
|
do_help
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
# Create a 4 disk raid5, create a filesystem and
|
# Create a 4 disk raid5, create a filesystem and
|
||||||
# sha1sum it with each device failed
|
# sha1sum it with each device failed
|
||||||
|
|
||||||
|
if [ "$INTEGRITY" != "yes" ]; then
|
||||||
|
echo -ne 'skipping... '
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
for layout in ls rs la ra
|
for layout in ls rs la ra
|
||||||
do
|
do
|
||||||
mdadm -CR $md0 -l5 --layout $layout -n4 $dev0 $dev1 $dev2 $dev3
|
mdadm -CR $md0 -l5 --layout $layout -n4 $dev0 $dev1 $dev2 $dev3
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
# Create a 5 disk raid6, dump some data to it, then
|
# Create a 5 disk raid6, dump some data to it, then
|
||||||
# sha1sum it with different pairs of devices failed
|
# sha1sum it with different pairs of devices failed
|
||||||
|
|
||||||
|
if [ "$INTEGRITY" != "yes" ]; then
|
||||||
|
echo -ne 'skipping... '
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
layouts='ls rs la ra'
|
layouts='ls rs la ra'
|
||||||
lv=`uname -r`
|
lv=`uname -r`
|
||||||
if expr $lv '>=' 2.6.30 > /dev/null
|
if expr $lv '>=' 2.6.30 > /dev/null
|
||||||
|
|
Loading…
Reference in New Issue