qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup
Date: Fri, 9 Jun 2017 07:05:54 -0500	[thread overview]
Message-ID: <024dd4f2-ecf8-088e-4207-822878a13433@redhat.com> (raw)
In-Reply-To: <1497009003-25794-3-git-send-email-kwolf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

On 06/09/2017 06:50 AM, Kevin Wolf wrote:
> 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).

Yeah, idempotency is a nice thing.

> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.qemu | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

> 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
>  }
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-06-09 12:06 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 ` [Qemu-devel] [PATCH 2/3] qemu-iotests: Allow starting new qemu after cleanup Kevin Wolf
2017-06-09 12:05   ` Eric Blake [this message]
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=024dd4f2-ecf8-088e-4207-822878a13433@redhat.com \
    --to=eblake@redhat.com \
    --cc=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).