]> granicus.if.org Git - zfs/commitdiff
ZTS: cleanup user_run
authorbunder2015 <omfgbunder@gmail.com>
Tue, 12 Jun 2018 17:37:12 +0000 (13:37 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 12 Jun 2018 17:37:12 +0000 (10:37 -0700)
user_run leaves two files in /tmp, moving them to $TEST_BASE_DIR and
adding them to the default cleanup routine.

Reviewed by: John Wren Kennedy <jwk404@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Signed-off-by: bunder2015 <omfgbunder@gmail.com>
Closes #7614

tests/zfs-tests/include/libtest.shlib

index 53914d3d087b99f6285b4235be1bf32a563b82c6..11ca81985c159af68056a3032f2bec4473b166e2 100644 (file)
@@ -589,6 +589,8 @@ function default_cleanup_noexit
        if is_mpath_device $disk1; then
                delete_partitions
        fi
+
+       rm -f $TEST_BASE_DIR/{err,out}
 }
 
 
@@ -2976,7 +2978,7 @@ function user_run
        shift
 
        log_note "user:$user $@"
-       eval su - \$user -c \"$@\" > /tmp/out 2>/tmp/err
+       eval su - \$user -c \"$@\" > $TEST_BASE_DIR/out 2>$TEST_BASE_DIR/err
        return $?
 }