Skip to content

Commit

Permalink
ZTS: three small follow up fixes for openzfs#11167
Browse files Browse the repository at this point in the history
Follow up fix for 0cb40fa. 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 openzfs#11311
  • Loading branch information
AttilaFueloep authored and jsai20 committed Mar 30, 2021
1 parent 857c23c commit 054af8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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=(
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ verify_runnable "global"
function cleanup
{
destroy_pool "$TESTPOOL"
rm -f "$VDEV_PREFIX"*
}

log_assert \
Expand Down

0 comments on commit 054af8e

Please sign in to comment.