]> git.proxmox.com Git - mirror_zfs.git/commitdiff
ZTS: zpool_create_002 clean up leftover filedisk
authorbunder2015 <omfgbunder@gmail.com>
Sun, 15 Apr 2018 22:17:44 +0000 (18:17 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 15 Apr 2018 22:17:44 +0000 (15:17 -0700)
zpool_create_002_pos did not clean up filedisk files left over from
running the test.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: bunder2015 <omfgbunder@gmail.com>
Closes #7435
Closes #7439

tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_002_pos.ksh

index bc50b65cc6d3793ee6bb5c5606ea2b21cc73d178..b98e5ac92f72a7ed80d09cc1286f2d325af90ffc 100755 (executable)
@@ -50,14 +50,14 @@ function cleanup
        for pool in $TESTPOOL $TESTPOOL1 $TESTPOOL2 $TESTPOOL3 $TESTPOOL4 \
                $TESTPOOL5 $TESTPOOL6
        do
-               poolexists $pool && destroy_pool $pool
+               destroy_pool $pool
        done
 
        clean_blockfile "$TESTDIR0 $TESTDIR1"
 
        for file in $FILEDISK0 $FILEDISK1 $FILEDISK2
        do
-               if [[ -e $file ]]; then
+               if [[ -e $TEST_BASE_DIR/$file ]]; then
                        rm -f $TEST_BASE_DIR/$file
                fi
        done