aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAttila Fülöp <[email protected]>2020-12-10 06:27:12 +0100
committerGitHub <[email protected]>2020-12-09 21:27:12 -0800
commitb9916b40647cfe615ba90612e0049ae8feac0dd1 (patch)
tree0616ebefa133961aea01d504c3a8f9523335afb6
parent957f9681eb7ce5562f4912e97fc64aeceb23bd7f (diff)
ZTS: three small follow up fixes for #11167
Follow up fix for 0cb40fa3. Remove unused variables, don't source unused libs and add missed cleanup. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Closes #11311
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh7
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh1
3 files changed, 4 insertions, 8 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh
index 5e16cddab..dbf81262e 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh
@@ -25,9 +25,7 @@
#
. $STF_SUITE/include/libtest.shlib
-. $STF_SUITE/tests/functional/cli_root/zpool_add/zpool_add.kshlib
-typeset TMPFILE_PREFIX="$TEST_BASE_DIR/zpool_add_dryrun_output"
typeset STR_DRYRUN="would update '$TESTPOOL' to the following configuration:"
typeset VDEV_PREFIX="$TEST_BASE_DIR/filedev"
@@ -136,7 +134,7 @@ verify_runnable "global"
function cleanup
{
destroy_pool "$TESTPOOL"
- rm -f "$TMPFILE_PREFIX"* "$VDEV_PREFIX"*
+ rm -f "$VDEV_PREFIX"*
}
log_assert "'zpool add -n <pool> <vdev> ...' can display the configuration"
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh
index 97c0c207d..1e4db20cf 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh
@@ -25,9 +25,7 @@
#
. $STF_SUITE/include/libtest.shlib
-. $STF_SUITE/tests/functional/cli_root/zpool_create/zpool_create.shlib
-typeset TMPFILE_PREFIX="$TEST_BASE_DIR/zpool_create_dryrun_output"
typeset STR_DRYRUN="would create '$TESTPOOL' with the following layout:"
typeset VDEV_PREFIX="$TEST_BASE_DIR/filedev"
@@ -36,7 +34,7 @@ typeset VDEV_PREFIX="$TEST_BASE_DIR/filedev"
# 'zpool create -n <pool> <vdev> ...' can display the correct configuration
#
# STRATEGY:
-# 1. Create a storage pool
+# 1. Create -n a storage pool and verify the output is as expected.
#
typeset -a dev=(
@@ -112,13 +110,12 @@ verify_runnable "global"
function cleanup
{
- rm -f "$TMPFILE_PREFIX"* "$VDEV_PREFIX"*
+ rm -f "$VDEV_PREFIX"*
}
log_assert "'zpool add -n <pool> <vdev> ...' can display the configuration"
log_onexit cleanup
-typeset disk1=$(create_blockfile $FILESIZE)
# Create needed file vdevs.
for (( i=0; i < ${#dev[@]}; i+=1 )); do
diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh
index f06339cea..2267ea7bd 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh
@@ -118,6 +118,7 @@ verify_runnable "global"
function cleanup
{
destroy_pool "$TESTPOOL"
+ rm -f "$VDEV_PREFIX"*
}
log_assert \