diff options
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh index 60ccc0dd6..441f7a7ae 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_rename_001_pos.ksh @@ -26,7 +26,7 @@ # # -# Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright (c) 2012, 2015 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib @@ -92,6 +92,8 @@ function cleanup [[ -d $ALTER_ROOT ]] && \ log_must $RM -rf $ALTER_ROOT + [[ -e $VDEV_FILE ]] && \ + log_must $RM $VDEV_FILE } log_onexit cleanup @@ -159,4 +161,13 @@ while (( i < ${#pools[*]} )); do ((i = i + 1)) done +VDEV_FILE=$(mktemp /tmp/tmp.XXXXXX) + +log_must $MKFILE -n 128M $VDEV_FILE +log_must $ZPOOL create testpool $VDEV_FILE +log_must $ZFS create testpool/testfs +ID=$($ZPOOL get -Ho value guid testpool) +log_must $ZPOOL export testpool +log_mustnot $ZPOOL import $(echo $ID) $($PRINTF "%*s\n" 250 "" | $TR ' ' 'c') + log_pass "Successfully imported and renamed a ZPOOL" |