X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fzpios-sanity.sh;h=fcd91b6e6a3f1815730e115aa944370171495159;hb=da88a7fbe8876437c25f1006f91ca5595659b8d2;hp=194ae82e2e033e722a6fc4957bfd4838e01dab0c;hpb=302ef1517e5769cbe6a12d94c89f44a90721bfd4;p=zfs.git diff --git a/scripts/zpios-sanity.sh b/scripts/zpios-sanity.sh index 194ae82..fcd91b6 100755 --- a/scripts/zpios-sanity.sh +++ b/scripts/zpios-sanity.sh @@ -13,6 +13,7 @@ fi PROG=zpios-sanity.sh HEADER= +FAILS=0 usage() { cat << EOF @@ -63,6 +64,8 @@ fi # Perform pre-cleanup is requested if [ ${CLEANUP} ]; then + ${ZFS_SH} -u + cleanup_md_devices cleanup_loop_devices rm -f /tmp/zpool.cache.* fi @@ -74,6 +77,8 @@ zpios_test() { ${ZPIOS_SH} -f -c ${CONFIG} -t ${TEST} &>${LOG} if [ $? -ne 0 ]; then + FAILS=1 + if [ ${VERBOSE} ]; then printf "FAIL: %-13s\n" ${CONFIG} cat ${LOG} @@ -145,6 +150,9 @@ DANGEROUS_CONFIGS=( \ dm0-raid0 \ ) +TMP_CACHE=`mktemp -p /tmp zpool.cache.XXXXXXXX` +${ZFS_SH} zfs="spa_config_path=${TMP_CACHE}" || die "Unable to load modules" + for CONFIG in ${SAFE_CONFIGS[*]}; do zpios_test $CONFIG tiny done @@ -155,4 +163,6 @@ if [ ${DANGEROUS} ]; then done fi -exit 0 +${ZFS_SH} -u + +exit $FAILS