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