From 527757126088aed28a92399f6b5c1a2647f7e176 Mon Sep 17 00:00:00 2001 From: bunder2015 Date: Tue, 12 Jun 2018 13:37:12 -0400 Subject: [PATCH] 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 Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Signed-off-by: bunder2015 Closes #7614 --- tests/zfs-tests/include/libtest.shlib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 53914d3d08..11ca81985c 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 $? }