From: bunder2015 Date: Tue, 12 Jun 2018 17:37:12 +0000 (-0400) Subject: ZTS: cleanup user_run X-Git-Tag: zfs-0.8.0-rc1~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=527757126088aed28a92399f6b5c1a2647f7e176;p=zfs 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 --- 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 $? }