X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fzpios-sanity.sh;h=0f441157d510c8d058d9b19e0e6591eb69734e68;hb=refs%2Fheads%2Frertzinger%2Ffeature-zpool-get--p;hp=c8e9bb5834cad75ea2fec99824b5887c03257995;hpb=2ea9dc40f88ed84bc3e8022b91dd33cbce94653f;p=zfs.git diff --git a/scripts/zpios-sanity.sh b/scripts/zpios-sanity.sh index c8e9bb5..0f44115 100755 --- a/scripts/zpios-sanity.sh +++ b/scripts/zpios-sanity.sh @@ -62,8 +62,13 @@ if [ $(id -u) != 0 ]; then die "Must run as root" fi +# Initialize the test suite +init + # Perform pre-cleanup is requested if [ ${CLEANUP} ]; then + ${ZFS_SH} -u + cleanup_md_devices cleanup_loop_devices rm -f /tmp/zpool.cache.* fi @@ -148,6 +153,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 @@ -158,4 +166,6 @@ if [ ${DANGEROUS} ]; then done fi +${ZFS_SH} -u + exit $FAILS