summaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
authorbunder2015 <[email protected]>2018-06-12 13:37:12 -0400
committerBrian Behlendorf <[email protected]>2018-06-12 10:37:12 -0700
commit527757126088aed28a92399f6b5c1a2647f7e176 (patch)
tree9cd889ea8b47a1e53cb45527738e3d19784ae7cd /tests/zfs-tests/include
parentc634808ebbc86fc0eac498bcb17adda407da5569 (diff)
ZTS: cleanup user_run
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 <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: bunder2015 <[email protected]> Closes #7614
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/libtest.shlib4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 53914d3d0..11ca81985 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -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 $?
}