Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-08-05 11:31:50 -07:00
commit 01816a0556
1 changed files with 12 additions and 2 deletions

View File

@ -17,7 +17,7 @@ HEADER=
usage() {
cat << EOF
USAGE:
$0 [hv]
$0 [hvxfc]
DESCRIPTION:
ZPIOS sanity tests
@ -27,11 +27,12 @@ OPTIONS:
-v Verbose
-x Destructive hd/sd/md/dm/ram tests
-f Don't prompt due to -x
-c Cleanup lo+file devices at start
EOF
}
while getopts 'hvxf' OPTION; do
while getopts 'hvxfc?' OPTION; do
case $OPTION in
h)
usage
@ -46,6 +47,9 @@ while getopts 'hvxf' OPTION; do
f)
FORCE=1
;;
c)
CLEANUP=1
;;
?)
usage
exit
@ -57,6 +61,12 @@ if [ $(id -u) != 0 ]; then
die "Must run as root"
fi
# Perform pre-cleanup is requested
if [ ${CLEANUP} ]; then
cleanup_loop_devices
rm -f /tmp/zpool.cache.*
fi
zpios_test() {
CONFIG=$1
TEST=$2