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 <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
This commit is contained in:
bunder2015 2018-06-12 13:37:12 -04:00 committed by Brian Behlendorf
parent c634808ebb
commit 5277571260

View 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 $?
}