diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg index 9349e5ff6..bf6026747 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg @@ -28,18 +28,10 @@ # Copyright (c) 2012 by Delphix. All rights reserved. # -export DISK=${DISKS%% *} export DISK_ARRAY_NUM=$(echo ${DISKS} | nawk '{print NF}') export DISKSARRAY=$DISKS +echo $DISKS | read DISK0 DISK1 if is_linux; then set_device_dir - set_slice_prefix - export SLICE0=1 - export SLICE1=2 -else - export SLICE0=0 - export SLICE1=1 - fi -export SLICE_SIZE=500m diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_001_pos.ksh index 041a1d00c..3323f1db0 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_001_pos.ksh @@ -56,26 +56,24 @@ function cleanup poolexists $pool && destroy_pool $pool done - zero_partitions $DISK + [ -n "$recursive" ] && set_tunable64 VOL_RECURSIVE $recursive } set -A datasets "$TESTPOOL" "$TESTPOOL2" -if ! is_physical_device $DISKS; then - log_unsupported "This case cannot be run on raw files." -fi - log_assert "'zpool destroy ' can destroy a specified pool." log_onexit cleanup -partition_disk $SLICE_SIZE $DISK 2 - -create_pool "$TESTPOOL" "${DISK}${SLICE_PREFIX}${SLICE0}" -create_pool "$TESTPOOL1" "${DISK}${SLICE_PREFIX}${SLICE1}" +create_pool $TESTPOOL $DISK0 +create_pool $TESTPOOL1 $DISK1 log_must zfs create -s -V $VOLSIZE $TESTPOOL1/$TESTVOL block_device_wait -create_pool "$TESTPOOL2" "${ZVOL_DEVDIR}/$TESTPOOL1/$TESTVOL" +if is_freebsd; then + typeset recursive=$(get_tunable VOL_RECURSIVE) + log_must set_tunable64 VOL_RECURSIVE 1 +fi +create_pool $TESTPOOL2 $ZVOL_DEVDIR/$TESTPOOL1/$TESTVOL typeset -i i=0 while (( i < ${#datasets[*]} )); do diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh index ad9425795..794a6c37c 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy_002_pos.ksh @@ -73,9 +73,7 @@ log_assert "'zpool destroy -f ' can forcely destroy the specified pool" log_onexit cleanup -typeset cwd="" - -create_pool "$TESTPOOL" "$DISK" +create_pool $TESTPOOL $DISK0 log_must zfs create $TESTPOOL/$TESTFS log_must mkdir -p $TESTDIR log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS @@ -90,7 +88,6 @@ while (( $i < ${#datasets[*]} )); do ((i = i + 1)) done -cwd=$PWD log_note "'zpool destroy' without '-f' will fail " \ "while pool is busy."