diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg index 0d75de9a2..4d98e7c11 100644 --- a/tests/zfs-tests/include/commands.cfg +++ b/tests/zfs-tests/include/commands.cfg @@ -33,6 +33,7 @@ export SYSTEM_FILES='arp diff dirname dmesg + dmidecode du echo egrep diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index b439b44f5..cd593b6f2 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -2202,10 +2202,11 @@ function cleanup_devices #vdevs { typeset pool="foopool$$" - if poolexists $pool ; then - destroy_pool $pool - fi + for vdev in $@; do + zero_partitions $vdev + done + poolexists $pool && destroy_pool $pool create_pool $pool $@ destroy_pool $pool diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh index 1f5510ae5..a08beb8b2 100755 --- a/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh +++ b/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh @@ -107,7 +107,6 @@ while (( i < ${#vdevs[*]} )); do create_pool $TESTPOOL1 ${vdevs[i]} $vslices spare $sslices log_must zpool export $TESTPOOL1 verify_assertion "$rawtargets" - cleanup_devices $vslices $sslices (( i = i + 1 )) done