Blame SOURCES/kvm-qemu-iotests-Allow-starting-new-qemu-after-cleanup.patch

76daa3
From d827ddd72436b79c2fcc437020de2024a2fa2508 Mon Sep 17 00:00:00 2001
76daa3
From: Kevin Wolf <kwolf@redhat.com>
76daa3
Date: Mon, 12 Jun 2017 13:33:34 +0200
76daa3
Subject: [PATCH 08/13] qemu-iotests: Allow starting new qemu after cleanup
76daa3
76daa3
RH-Author: Kevin Wolf <kwolf@redhat.com>
76daa3
Message-id: <1497274415-4884-3-git-send-email-kwolf@redhat.com>
76daa3
Patchwork-id: 75587
76daa3
O-Subject: [RHEL-7.4 qemu-kvm-rhev PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup
76daa3
Bugzilla: 1453169
76daa3
RH-Acked-by: Max Reitz <mreitz@redhat.com>
76daa3
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
76daa3
RH-Acked-by: John Snow <jsnow@redhat.com>
76daa3
76daa3
After _cleanup_qemu(), test cases should be able to start the next qemu
76daa3
process and call _cleanup_qemu() for that one as well. For this to work
76daa3
cleanly, we need to improve the cleanup so that the second invocation
76daa3
doesn't try to kill the qemu instances from the first invocation a
76daa3
second time (which would result in error messages).
76daa3
76daa3
Upstream status: Applied to git://repo.or.cz/qemu/kevin.git block
76daa3
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
76daa3
Reviewed-by: Eric Blake <eblake@redhat.com>
76daa3
Reviewed-by: Max Reitz <mreitz@redhat.com>
76daa3
76daa3
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
76daa3
---
76daa3
 tests/qemu-iotests/common.qemu | 3 +++
76daa3
 1 file changed, 3 insertions(+)
76daa3
76daa3
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
76daa3
index 4278789..44a2c19 100644
76daa3
--- a/tests/qemu-iotests/common.qemu
76daa3
+++ b/tests/qemu-iotests/common.qemu
76daa3
@@ -222,5 +222,8 @@ function _cleanup_qemu()
76daa3
         rm -f "${QEMU_FIFO_IN}_${i}" "${QEMU_FIFO_OUT}_${i}"
76daa3
         eval "exec ${QEMU_IN[$i]}<&-"   # close file descriptors
76daa3
         eval "exec ${QEMU_OUT[$i]}<&-"
76daa3
+
76daa3
+        unset QEMU_IN[$i]
76daa3
+        unset QEMU_OUT[$i]
76daa3
     done
76daa3
 }
76daa3
-- 
76daa3
1.8.3.1
76daa3