qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup
Date: Fri,  9 Jun 2017 13:50:02 +0200	[thread overview]
Message-ID: <1497009003-25794-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1497009003-25794-1-git-send-email-kwolf@redhat.com>

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).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 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 7a78a00..76ef298 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

  parent reply	other threads:[~2017-06-09 11:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 11:50 [Qemu-devel] [PATCH 0/3] commit: Fix completion with extra reference Kevin Wolf
2017-06-09 11:50 ` [Qemu-devel] [PATCH 1/3] " Kevin Wolf
2017-06-09 12:05   ` Eric Blake
2017-06-09 14:18   ` [Qemu-devel] [Qemu-block] " Max Reitz
2017-06-09 11:50 ` Kevin Wolf [this message]
2017-06-09 12:05   ` [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup Eric Blake
2017-06-09 14:20   ` [Qemu-devel] [Qemu-block] " Max Reitz
2017-06-09 11:50 ` [Qemu-devel] [PATCH 3/3] qemu-iotests: Test exiting qemu with running job Kevin Wolf
2017-06-09 12:14   ` Eric Blake
2017-06-09 12:58     ` Kevin Wolf
2017-06-09 14:16       ` Eric Blake
2017-06-09 15:55         ` Kevin Wolf
2017-06-09 17:07           ` Eric Blake
2017-06-09 14:10   ` [Qemu-devel] [Qemu-block] " Max Reitz
2017-06-09 14:24     ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497009003-25794-3-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).