diff options
author | Jeff Cody <jcody@redhat.com> | 2017-01-25 20:08:21 -0500 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2017-02-12 00:47:42 +0100 |
commit | 846a1d118e2e7bce8640452e181c53f902a40dbf (patch) | |
tree | 69fa2b5e7a6d4cc95a616c10d3097c4d29ce4e55 /tests/qemu-iotests/common.config | |
parent | 418661e0324c1c419552cf24bd4447292e884bdd (diff) |
qemu-iotests: Don't create fifos / pidfiles with protocol paths
Trying to create, use, and remove fifos and pidfiles on protocol paths
(e.g. nfs://localhost/scratch/qemu-nbd.pid) is obviously broken.
Use the local $TEST_DIR path before it is 'protocolized' for these
files.
Signed-off-by: Jeff Cody <jcody@redhat.com>
Message-id: bb4a731a35bc4ac81fe3db17479dd686315317c7.1485392617.git.jcody@redhat.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common.config')
-rw-r--r-- | tests/qemu-iotests/common.config | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config index f6384fbae7..55527aac87 100644 --- a/tests/qemu-iotests/common.config +++ b/tests/qemu-iotests/common.config @@ -109,7 +109,7 @@ _qemu_wrapper() { ( if [ -n "${QEMU_NEED_PID}" ]; then - echo $BASHPID > "${TEST_DIR}/qemu-${_QEMU_HANDLE}.pid" + echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid" fi exec "$QEMU_PROG" $QEMU_OPTIONS "$@" ) @@ -151,7 +151,7 @@ _qemu_io_wrapper() _qemu_nbd_wrapper() { ( - echo $BASHPID > "${TEST_DIR}/qemu-nbd.pid" + echo $BASHPID > "${QEMU_TEST_DIR}/qemu-nbd.pid" exec "$QEMU_NBD_PROG" $QEMU_NBD_OPTIONS "$@" ) } @@ -186,6 +186,8 @@ if [ -z "$TEST_DIR" ]; then TEST_DIR=`pwd`/scratch fi +QEMU_TEST_DIR="${TEST_DIR}" + if [ ! -e "$TEST_DIR" ]; then mkdir "$TEST_DIR" fi |