From d08eed36a2c42e7917cebcd69e7046f9213674b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20F=C3=BCl=C3=B6p?= Date: Sat, 5 Dec 2020 10:06:53 +0100 Subject: [PATCH] zpool: Two small fixes for #11167 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow up fix for 0cb40fa3. Remove unused variables and add missed cleanup. Signed-off-by: Attila Fülöp --- .../functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh | 3 +-- .../cli_root/zpool_create/zpool_create_dryrun_output.ksh | 4 +--- .../cli_root/zpool_split/zpool_split_dryrun_output.ksh | 1 + 3 files changed, 3 insertions(+), 5 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 5e16cddabbd2..7366511ae6e9 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 @@ -27,7 +27,6 @@ . $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 +135,7 @@ verify_runnable "global" function cleanup { destroy_pool "$TESTPOOL" - rm -f "$TMPFILE_PREFIX"* "$VDEV_PREFIX"* + rm -f "$VDEV_PREFIX"* } log_assert "'zpool add -n ...' 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 97c0c207d7ab..02fdddbfe601 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 @@ -27,7 +27,6 @@ . $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" @@ -112,13 +111,12 @@ verify_runnable "global" function cleanup { - rm -f "$TMPFILE_PREFIX"* "$VDEV_PREFIX"* + rm -f "$VDEV_PREFIX"* } log_assert "'zpool add -n ...' 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 f06339ceaf4e..2267ea7bd895 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 \