diff options
Diffstat (limited to 'tests/qemu-iotests/check')
-rwxr-xr-x | tests/qemu-iotests/check | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 8ca40116d7..8e1061eb7c 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -19,7 +19,6 @@ # Control script for QA # -tmp=/tmp/$$ status=0 needwrap=true try=0 @@ -121,6 +120,10 @@ then _init_error "failed to source common.rc" fi +# Temporary directory to store test results, will be removed by _wrapup +QEMU_IOTESTS_TMPDIR=$(mktemp -d --tmpdir qemu-iotests.XXXXXXXX) +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ + # we need common . "$source_iotests/common" @@ -197,9 +200,8 @@ END { if (NR > 0) { needwrap=false fi - rm -f /tmp/*.out /tmp/*.err /tmp/*.time rm -f /tmp/check.pid /tmp/check.sts - rm -f $tmp.* + rm -rf "$QEMU_IOTESTS_TMPDIR" } trap "_wrapup; exit \$status" 0 1 2 3 15 @@ -349,6 +351,7 @@ do fi fi fi + rm -f "$tmp.out" fi |