OSDN Git Service

iotests: Use qemu-nbd's --pid-file
authorMax Reitz <mreitz@redhat.com>
Wed, 8 May 2019 21:18:19 +0000 (23:18 +0200)
committerEric Blake <eblake@redhat.com>
Thu, 13 Jun 2019 13:50:47 +0000 (08:50 -0500)
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20190508211820.17851-5-mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/common.rc

index 93f8738..5502c3d 100644 (file)
@@ -105,10 +105,8 @@ _qemu_io_wrapper()
 
 _qemu_nbd_wrapper()
 {
-    (
-        echo $BASHPID > "${QEMU_TEST_DIR}/qemu-nbd.pid"
-        exec "$QEMU_NBD_PROG" $QEMU_NBD_OPTIONS "$@"
-    )
+    "$QEMU_NBD_PROG" --pid-file="${QEMU_TEST_DIR}/qemu-nbd.pid" \
+                     $QEMU_NBD_OPTIONS "$@"
 }
 
 _qemu_vxhs_wrapper()