qemu-iotests: stop using /tmp directly
PATCH 1/1 qemu-iotests: stop using /tmp directly
Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of /tmp (for writing output in the individual tests and valgrind logs).
Furthermore, this patch stops removing everything in /tmp/ matching a certain pattern (/tmp/*.{err,out,time}). These might not be a property of QEMU.
Running multiple concurrent tests in the same object directory is still not supported though as the scratch directory and .bad and .notrun files still interfere with each other. Also not touched is the situation that /tmp/check.log and /tmp/check.sts are hard-coded (and thus unusable in concurrent tests).
---
Hi,
This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030 failed randomly with QED):
FAIL: test_ignore (__main__.TestEIO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "030", line 223, in test_ignore
self.assert_qmp(result, 'return[0]/paused', False)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 233, in assert_qmp
result = self.dictpath(d, path)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 221, in dictpath
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
AssertionError: invalid index "0" in path "return[0]/paused" in "[]"
I still think that the patches are valuable though, it reduces predictable file names.
Kind regards,
Peter
--- tests/qemu-iotests/001 | 2 +- tests/qemu-iotests/002 | 2 +- tests/qemu-iotests/003 | 2 +- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/005 | 2 +- tests/qemu-iotests/006 | 2 +- tests/qemu-iotests/007 | 2 +- tests/qemu-iotests/008 | 2 +- tests/qemu-iotests/009 | 2 +- tests/qemu-iotests/010 | 2 +- tests/qemu-iotests/011 | 2 +- tests/qemu-iotests/012 | 2 +- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/015 | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/017 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/021 | 2 +- tests/qemu-iotests/022 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/027 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/032 | 2 +- tests/qemu-iotests/033 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/042 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 2 +- tests/qemu-iotests/050 | 2 +- tests/qemu-iotests/051 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/053 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/062 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/064 | 2 +- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/067 | 2 +- tests/qemu-iotests/068 | 2 +- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/070 | 2 +- tests/qemu-iotests/071 | 2 +- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/073 | 2 +- tests/qemu-iotests/075 | 2 +- tests/qemu-iotests/076 | 2 +- tests/qemu-iotests/077 | 2 +- tests/qemu-iotests/078 | 2 +- tests/qemu-iotests/079 | 2 +- tests/qemu-iotests/080 | 2 +- tests/qemu-iotests/081 | 2 +- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/083 | 2 +- tests/qemu-iotests/084 | 2 +- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 2 +- tests/qemu-iotests/088 | 2 +- tests/qemu-iotests/089 | 2 +- tests/qemu-iotests/090 | 2 +- tests/qemu-iotests/092 | 2 +- tests/qemu-iotests/check | 9 ++++++--- tests/qemu-iotests/common.rc | 7 ++++--- 81 files changed, 89 insertions(+), 85 deletions(-)
tests/qemu-iotests/001 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/002 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/003 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/004 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/005 +1 -1
@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/006 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/007 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/008 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/009 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/010 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/011 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/012 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/013 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/014 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/015 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/016 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/017 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/018 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/019 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/020 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/021 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/022 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/023 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/024 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/025 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/026 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/027 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/028 +1 -1
@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/029 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/031 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/032 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/033 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/034 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/035 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/036 +1 -1
@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/037 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/038 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/039 +1 -1
@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/042 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/043 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/046 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/047 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/049 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/050 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/051 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/052 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/053 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/054 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/058 +1 -1
@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket
tests/qemu-iotests/059 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/060 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/061 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/062 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/063 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/064 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/066 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/067 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checks
tests/qemu-iotests/068 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/069 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/070 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/071 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/072 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/073 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/075 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/076 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/077 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/078 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/079 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/080 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/081 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/082 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/083 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checks
tests/qemu-iotests/084 +1 -1
@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/086 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/087 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checks
tests/qemu-iotests/088 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/089 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/090 +1 -1
@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/092 +1 -1
@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()
tests/qemu-iotests/check +6 -3
@@ -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
tests/qemu-iotests/common.rc +4 -3
@@ -72,11 +72,12 @@ fi function valgrind_qemu_io() { - valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + local vgtmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$.valgrind + valgrind --log-file="$vgtmp" --error-exitcode=99 $REAL_QEMU_IO "$@" if [ $? != 0 ]; then - cat /tmp/$$.valgrind + cat "$vgtmp" fi - rm -f /tmp/$$.valgrind + rm -f "$vgtmp" }
Signature · 1 line
2.1.0
Quoted 15 lines · Peter Wu
Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of
/tmp(for writing output in the individual tests and valgrind logs).Furthermore, this patch stops removing everything in
/tmp/matching a certain pattern (/tmp/*.{err,out,time}). These might not be a property of QEMU.Running multiple concurrent tests in the same object directory is still not supported though as the scratch directory and .bad and .notrun files still interfere with each other. Also not touched is the situation that
/tmp/check.logand/tmp/check.stsare hard-coded (and thus unusable in concurrent tests).
Quoted 6 lines
Signed-off-by Peter Wu <[email protected]>---
Hi,This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030 failed randomly with QED):
Do we care about the BSDs ?
See the link in the anwser of: http://stackoverflow.com/questions/2792675/how-portable-is-mktemp1
--tmpdir seems to be a GNUism.
Best regards
Benoît
Quoted 1,194 lines
FAIL:
test_ignore(__main__.TestEIO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "030", line 223, intest_ignore
self.assert_qmp(result, 'return[0]/paused', False)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 233, inassert_qmp
result =self.dictpath(d, path)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 221, in dictpath
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
AssertionError: invalid index "0" in path "return[0]/paused" in "[]"I still think that the patches are valuable though, it reduces predictable file names.
Kind regards,
Peter--- tests/qemu-iotests/001 | 2 +- tests/qemu-iotests/002 | 2 +- tests/qemu-iotests/003 | 2 +- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/005 | 2 +- tests/qemu-iotests/006 | 2 +- tests/qemu-iotests/007 | 2 +- tests/qemu-iotests/008 | 2 +- tests/qemu-iotests/009 | 2 +- tests/qemu-iotests/010 | 2 +- tests/qemu-iotests/011 | 2 +- tests/qemu-iotests/012 | 2 +- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/015 | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/017 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/021 | 2 +- tests/qemu-iotests/022 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/027 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/032 | 2 +- tests/qemu-iotests/033 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/042 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 2 +- tests/qemu-iotests/050 | 2 +- tests/qemu-iotests/051 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/053 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/062 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/064 | 2 +- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/067 | 2 +- tests/qemu-iotests/068 | 2 +- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/070 | 2 +- tests/qemu-iotests/071 | 2 +- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/073 | 2 +- tests/qemu-iotests/075 | 2 +- tests/qemu-iotests/076 | 2 +- tests/qemu-iotests/077 | 2 +- tests/qemu-iotests/078 | 2 +- tests/qemu-iotests/079 | 2 +- tests/qemu-iotests/080 | 2 +- tests/qemu-iotests/081 | 2 +- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/083 | 2 +- tests/qemu-iotests/084 | 2 +- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 2 +- tests/qemu-iotests/088 | 2 +- tests/qemu-iotests/089 | 2 +- tests/qemu-iotests/090 | 2 +- tests/qemu-iotests/092 | 2 +- tests/qemu-iotests/check | 9 ++++++--- tests/qemu-iotests/common.rc | 7 ++++--- 81 files changed, 89 insertions(+), 85 deletions(-)tests/qemu-iotests/001 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/002 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/003 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/004 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/005 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/006 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/007 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/008 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/009 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/010 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/011 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/012 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/013 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/014 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/015 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/016 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/017 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/018 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/019 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/020 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/021 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/022 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/023 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/024 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/025 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/026 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/027 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/028 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/029 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/031 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/032 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/033 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/034 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/035 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/036 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/037 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/038 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/039 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/042 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/043 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/046 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/047 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/049 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/050 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/051 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/052 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/053 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/054 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/058 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_sockettests/qemu-iotests/059 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/060 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/061 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/062 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/063 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/064 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/066 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/067 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/068 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/069 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/070 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/071 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/072 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/073 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/075 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/076 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/077 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/078 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/079 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/080 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/081 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/082 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/083 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/084 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/086 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/087 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/088 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/089 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/090 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/092 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/check +6
-3@@ -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" fitests/qemu-iotests/common.rc +4
-3@@ -72,11 +72,12 @@ fi function valgrind_qemu_io() { - valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + local vgtmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$.valgrind + valgrind --log-file="$vgtmp" --error-exitcode=99 $REAL_QEMU_IO "$@" if [ $? != 0 ]; then - cat /tmp/$$.valgrind + cat "$vgtmp" fi - rm -f /tmp/$$.valgrind + rm -f "$vgtmp" }Signature · 1 line
2.1.0
Quoted 20 lines · On Friday 22 August 2014 20:58:34 Benoît Canet wrote:
Quoted 19 lines · Peter Wu
Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of
/tmp(for writing output in the individual tests and valgrind logs).Furthermore, this patch stops removing everything in
/tmp/matching a certain pattern (/tmp/*.{err,out,time}). These might not be a property of QEMU.Running multiple concurrent tests in the same object directory is still not supported though as the scratch directory and .bad and .notrun files still interfere with each other. Also not touched is the situation that
/tmp/check.logand/tmp/check.stsare hard-coded (and thus unusable in concurrent tests).Signed-off-by Peter Wu <[email protected]>---
Hi,
Quoted 8 lines
Quoted 2 lines
This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030 failed randomly with QED):
Do we care about the BSDs ?
See the link in the anwser of: http://stackoverflow.com/questions/2792675/how-portable-is-mktemp1
--tmpdir seems to be a GNUism.
And -t differs between FreeBSD and others too. There is probably nobody who cares about locations other than /tmp, so what about:
QEMU_IOTESTS_TMPDIR=$(mktemp -d /tmp/qemu-iotests.XXXXXXXX)
What do you think of the idea of the patch in general?
Kind regards,
Peter
https://lekensteyn.nl
Quoted 1,189 lines
Quoted 1,189 lines
FAIL:
test_ignore(__main__.TestEIO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "030", line 223, intest_ignore
self.assert_qmp(result, 'return[0]/paused', False)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 233, inassert_qmp
result =self.dictpath(d, path)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 221, in dictpath
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
AssertionError: invalid index "0" in path "return[0]/paused" in "[]"I still think that the patches are valuable though, it reduces predictable file names.
Kind regards,
Peter--- tests/qemu-iotests/001 | 2 +- tests/qemu-iotests/002 | 2 +- tests/qemu-iotests/003 | 2 +- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/005 | 2 +- tests/qemu-iotests/006 | 2 +- tests/qemu-iotests/007 | 2 +- tests/qemu-iotests/008 | 2 +- tests/qemu-iotests/009 | 2 +- tests/qemu-iotests/010 | 2 +- tests/qemu-iotests/011 | 2 +- tests/qemu-iotests/012 | 2 +- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/015 | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/017 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/021 | 2 +- tests/qemu-iotests/022 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/027 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/032 | 2 +- tests/qemu-iotests/033 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/042 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 2 +- tests/qemu-iotests/050 | 2 +- tests/qemu-iotests/051 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/053 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/062 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/064 | 2 +- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/067 | 2 +- tests/qemu-iotests/068 | 2 +- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/070 | 2 +- tests/qemu-iotests/071 | 2 +- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/073 | 2 +- tests/qemu-iotests/075 | 2 +- tests/qemu-iotests/076 | 2 +- tests/qemu-iotests/077 | 2 +- tests/qemu-iotests/078 | 2 +- tests/qemu-iotests/079 | 2 +- tests/qemu-iotests/080 | 2 +- tests/qemu-iotests/081 | 2 +- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/083 | 2 +- tests/qemu-iotests/084 | 2 +- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 2 +- tests/qemu-iotests/088 | 2 +- tests/qemu-iotests/089 | 2 +- tests/qemu-iotests/090 | 2 +- tests/qemu-iotests/092 | 2 +- tests/qemu-iotests/check | 9 ++++++--- tests/qemu-iotests/common.rc | 7 ++++--- 81 files changed, 89 insertions(+), 85 deletions(-)tests/qemu-iotests/001 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/002 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/003 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/004 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/005 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/006 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/007 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/008 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/009 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/010 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/011 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/012 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/013 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/014 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/015 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/016 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/017 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/018 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/019 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/020 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/021 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/022 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/023 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/024 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/025 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/026 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/027 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/028 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/029 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/031 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/032 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/033 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/034 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/035 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/036 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/037 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/038 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/039 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/042 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/043 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/046 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/047 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/049 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/050 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/051 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/052 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/053 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/054 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/058 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_sockettests/qemu-iotests/059 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/060 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/061 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/062 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/063 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/064 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/066 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/067 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/068 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/069 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/070 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/071 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/072 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/073 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/075 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/076 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/077 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/078 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/079 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/080 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/081 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/082 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/083 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/084 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/086 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/087 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/088 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/089 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/090 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/092 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/check +6
-3@@ -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" fitests/qemu-iotests/common.rc +4
-3@@ -72,11 +72,12 @@ fi function valgrind_qemu_io() { - valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + local vgtmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$.valgrind + valgrind --log-file="$vgtmp" --error-exitcode=99 $REAL_QEMU_IO "$@" if [ $? != 0 ]; then - cat /tmp/$$.valgrind + cat "$vgtmp" fi - rm -f /tmp/$$.valgrind + rm -f "$vgtmp" }
Quoted 28 lines · Peter Wu
Quoted 27 lines · On Friday 22 August 2014 20:58:34 Benoît Canet wrote:
Quoted 15 lines · Peter Wu
Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of
/tmp(for writing output in the individual tests and valgrind logs).Furthermore, this patch stops removing everything in
/tmp/matching a certain pattern (/tmp/*.{err,out,time}). These might not be a property of QEMU.Running multiple concurrent tests in the same object directory is still not supported though as the scratch directory and .bad and .notrun files still interfere with each other. Also not touched is the situation that
/tmp/check.logand/tmp/check.stsare hard-coded (and thus unusable in concurrent tests).Quoted 6 lines
Signed-off-by Peter Wu <[email protected]>---
Hi,This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030 failed randomly with QED):
Do we care about the BSDs ?
See the link in the anwser of: http://stackoverflow.com/questions/2792675/how-portable-is-mktemp1
Quoted 8 lines
Quoted 1 line
--tmpdir seems to be a GNUism.
And
-tdiffers between FreeBSD and others too. There is probably nobody who cares about locations other than /tmp, so what about:QEMU_IOTESTS_TMPDIR=$(mktemp -d /tmp/qemu-iotests.XXXXXXXX)What do you think of the idea of the patch in general?
I think it could be usefull for continuous integration setup.
Best regards
Benoît
Quoted 1,195 lines
Kind regards,
Peter
https://lekensteyn.nlQuoted 1,189 lines
Quoted 1,189 lines
FAIL:
test_ignore(__main__.TestEIO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "030", line 223, intest_ignore
self.assert_qmp(result, 'return[0]/paused', False)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 233, inassert_qmp
result =self.dictpath(d, path)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 221, in dictpath
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
AssertionError: invalid index "0" in path "return[0]/paused" in "[]"I still think that the patches are valuable though, it reduces predictable file names.
Kind regards,
Peter--- tests/qemu-iotests/001 | 2 +- tests/qemu-iotests/002 | 2 +- tests/qemu-iotests/003 | 2 +- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/005 | 2 +- tests/qemu-iotests/006 | 2 +- tests/qemu-iotests/007 | 2 +- tests/qemu-iotests/008 | 2 +- tests/qemu-iotests/009 | 2 +- tests/qemu-iotests/010 | 2 +- tests/qemu-iotests/011 | 2 +- tests/qemu-iotests/012 | 2 +- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/015 | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/017 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/021 | 2 +- tests/qemu-iotests/022 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/027 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/032 | 2 +- tests/qemu-iotests/033 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/042 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 2 +- tests/qemu-iotests/050 | 2 +- tests/qemu-iotests/051 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/053 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/062 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/064 | 2 +- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/067 | 2 +- tests/qemu-iotests/068 | 2 +- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/070 | 2 +- tests/qemu-iotests/071 | 2 +- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/073 | 2 +- tests/qemu-iotests/075 | 2 +- tests/qemu-iotests/076 | 2 +- tests/qemu-iotests/077 | 2 +- tests/qemu-iotests/078 | 2 +- tests/qemu-iotests/079 | 2 +- tests/qemu-iotests/080 | 2 +- tests/qemu-iotests/081 | 2 +- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/083 | 2 +- tests/qemu-iotests/084 | 2 +- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 2 +- tests/qemu-iotests/088 | 2 +- tests/qemu-iotests/089 | 2 +- tests/qemu-iotests/090 | 2 +- tests/qemu-iotests/092 | 2 +- tests/qemu-iotests/check | 9 ++++++--- tests/qemu-iotests/common.rc | 7 ++++--- 81 files changed, 89 insertions(+), 85 deletions(-)tests/qemu-iotests/001 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/002 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/003 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/004 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/005 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/006 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/007 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/008 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/009 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/010 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/011 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/012 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/013 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/014 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/015 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/016 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/017 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/018 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/019 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/020 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/021 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/022 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/023 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/024 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/025 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/026 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/027 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/028 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/029 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/031 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/032 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/033 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/034 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/035 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/036 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/037 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/038 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/039 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/042 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/043 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/046 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/047 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/049 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/050 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/051 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/052 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/053 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/054 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/058 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_sockettests/qemu-iotests/059 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/060 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/061 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/062 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/063 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/064 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/066 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/067 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/068 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/069 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/070 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/071 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/072 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/073 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/075 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/076 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/077 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/078 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/079 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/080 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/081 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/082 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/083 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/084 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/086 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/087 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/088 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/089 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/090 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/092 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/check +6
-3@@ -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" fitests/qemu-iotests/common.rc +4
-3@@ -72,11 +72,12 @@ fi function valgrind_qemu_io() { - valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + local vgtmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$.valgrind + valgrind --log-file="$vgtmp" --error-exitcode=99 $REAL_QEMU_IO "$@" if [ $? != 0 ]; then - cat /tmp/$$.valgrind + cat "$vgtmp" fi - rm -f /tmp/$$.valgrind + rm -f "$vgtmp" }
Quoted 127 lines · Peter Wu
Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead of
/tmp(for writing output in the individual tests and valgrind logs).Furthermore, this patch stops removing everything in
/tmp/matching a certain pattern (/tmp/*.{err,out,time}). These might not be a property of QEMU.Running multiple concurrent tests in the same object directory is still not supported though as the scratch directory and .bad and .notrun files still interfere with each other. Also not touched is the situation that
/tmp/check.logand/tmp/check.stsare hard-coded (and thus unusable in concurrent tests).Signed-off-by Peter Wu <[email protected]>---
Hi,This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030 failed randomly with QED):
FAIL:
test_ignore(__main__.TestEIO)
----------------------------------------------------------------------
Traceback (most recent call last):
File "030", line 223, intest_ignore
self.assert_qmp(result, 'return[0]/paused', False)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 233, inassert_qmp
result =self.dictpath(d, path)
File "/tmp/qemu/tests/qemu-iotests/iotests.py", line 221, in dictpath
self.fail('invalid index "%s" in path "%s" in "%s"' % (idx, path, str(d)))
AssertionError: invalid index "0" in path "return[0]/paused" in "[]"I still think that the patches are valuable though, it reduces predictable file names.
Kind regards,
Peter--- tests/qemu-iotests/001 | 2 +- tests/qemu-iotests/002 | 2 +- tests/qemu-iotests/003 | 2 +- tests/qemu-iotests/004 | 2 +- tests/qemu-iotests/005 | 2 +- tests/qemu-iotests/006 | 2 +- tests/qemu-iotests/007 | 2 +- tests/qemu-iotests/008 | 2 +- tests/qemu-iotests/009 | 2 +- tests/qemu-iotests/010 | 2 +- tests/qemu-iotests/011 | 2 +- tests/qemu-iotests/012 | 2 +- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/015 | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/017 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/021 | 2 +- tests/qemu-iotests/022 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/027 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/029 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/032 | 2 +- tests/qemu-iotests/033 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/035 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/042 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/047 | 2 +- tests/qemu-iotests/049 | 2 +- tests/qemu-iotests/050 | 2 +- tests/qemu-iotests/051 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/053 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/062 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/064 | 2 +- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/067 | 2 +- tests/qemu-iotests/068 | 2 +- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/070 | 2 +- tests/qemu-iotests/071 | 2 +- tests/qemu-iotests/072 | 2 +- tests/qemu-iotests/073 | 2 +- tests/qemu-iotests/075 | 2 +- tests/qemu-iotests/076 | 2 +- tests/qemu-iotests/077 | 2 +- tests/qemu-iotests/078 | 2 +- tests/qemu-iotests/079 | 2 +- tests/qemu-iotests/080 | 2 +- tests/qemu-iotests/081 | 2 +- tests/qemu-iotests/082 | 2 +- tests/qemu-iotests/083 | 2 +- tests/qemu-iotests/084 | 2 +- tests/qemu-iotests/086 | 2 +- tests/qemu-iotests/087 | 2 +- tests/qemu-iotests/088 | 2 +- tests/qemu-iotests/089 | 2 +- tests/qemu-iotests/090 | 2 +- tests/qemu-iotests/092 | 2 +- tests/qemu-iotests/check | 9 ++++++--- tests/qemu-iotests/common.rc | 7 ++++--- 81 files changed, 89 insertions(+), 85 deletions(-)tests/qemu-iotests/001 +0
-0
tests/qemu-iotests/001 seq=`basename $0` · line 28
Quoted 5 lines
tests/qemu-iotests/001 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$
Maybe we could simply drop this repetition and set tmp from check or common.rc?
Fam
Quoted 1,083 lines
tests/qemu-iotests/001 +0
-0status=1 # failure is the default! _cleanup()tests/qemu-iotests/002 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/003 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/004 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/005 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/006 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/007 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/008 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/009 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/010 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/011 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/012 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/013 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/014 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/015 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/016 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/017 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/018 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/019 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/020 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/021 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/022 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/023 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/024 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/025 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/026 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/027 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/028 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/029 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/031 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/032 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/033 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/034 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/035 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/036 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/037 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/038 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/039 +1
-1@@ -28,7 +28,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/042 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/043 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/046 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/047 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/049 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/050 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/051 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/052 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/053 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/054 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/058 +1
-1@@ -27,7 +27,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_sockettests/qemu-iotests/059 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/060 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/061 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/062 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/063 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/064 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/066 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/067 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/068 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/069 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/070 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/071 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/072 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/073 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/075 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/076 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/077 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/078 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/079 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/080 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/081 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/082 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/083 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/084 +1
-1@@ -26,7 +26,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/086 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/087 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! # get standard environment, filters and checkstests/qemu-iotests/088 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/089 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/090 +1
-1@@ -25,7 +25,7 @@ seq="$(basename $0)" echo "QA output created by $seq" here="$PWD" -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/092 +1
-1@@ -25,7 +25,7 @@ seq=`basename $0` echo "QA output created by $seq" here=`pwd` -tmp=/tmp/$$ +tmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$ status=1 # failure is the default! _cleanup()tests/qemu-iotests/check +6
-3@@ -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" fitests/qemu-iotests/common.rc +4
-3@@ -72,11 +72,12 @@ fi function valgrind_qemu_io() { - valgrind --log-file=/tmp/$$.valgrind --error-exitcode=99 $REAL_QEMU_IO "$@" + local vgtmp=${QEMU_IOTESTS_TMPDIR:-/tmp}/$$.valgrind + valgrind --log-file="$vgtmp" --error-exitcode=99 $REAL_QEMU_IO "$@" if [ $? != 0 ]; then - cat /tmp/$$.valgrind + cat "$vgtmp" fi - rm -f /tmp/$$.valgrind + rm -f "$vgtmp" }Signature · 1 line
2.1.0