[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 07/12] iotests: Only kill NBD server if it runs
From: |
Max Reitz |
Subject: |
[Qemu-stable] [PATCH 07/12] iotests: Only kill NBD server if it runs |
Date: |
Tue, 25 Nov 2014 15:08:00 +0100 |
There may be NBD tests which do not create a sample image and simply
test whether wrong usage of the protocol is rejected as expected. In
this case, there will be no NBD server and trying to kill it during
clean-up will fail.
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/common.rc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 9c49deb..f2554ec 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -175,7 +175,9 @@ _cleanup_test_img()
case "$IMGPROTO" in
nbd)
- kill $QEMU_NBD_PID
+ if [ -n "$QEMU_NBD_PID" ]; then
+ kill $QEMU_NBD_PID
+ fi
rm -f "$TEST_IMG_FILE"
;;
file)
--
1.9.3
- Re: [Qemu-stable] [Qemu-devel] [PATCH 01/12] block: qcow2 driver may not be found, (continued)
[Qemu-stable] [PATCH 03/12] block/nfs: Add create_opts, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 04/12] block: Check create_opts before image creation, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 05/12] qemu-img: Check create_opts before image creation, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 06/12] qemu-img: Check create_opts before image amendment, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 08/12] iotests: Add test for unsupported image creation, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 07/12] iotests: Only kill NBD server if it runs,
Max Reitz <=
[Qemu-stable] [PATCH 09/12] qcow2: Prevent numerical overflow, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 10/12] qcow2: Flushing the caches in qcow2_close may fail, Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 12/12] block/raw-posix: Fix ret in raw_open_common(), Max Reitz, 2014/11/25
[Qemu-stable] [PATCH 11/12] qcow2: Respect bdrv_truncate() error, Max Reitz, 2014/11/25