qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/3] iotests: Add "wait" functionality to _cleanup_qemu
Date: Mon, 9 Feb 2015 17:49:04 +0000	[thread overview]
Message-ID: <20150209174904.GE18233@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <54D8D432.5010806@redhat.com>

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

On Mon, Feb 09, 2015 at 10:37:22AM -0500, Max Reitz wrote:
> On 2015-02-09 at 10:01, Stefan Hajnoczi wrote:
> >On Fri, Feb 06, 2015 at 04:06:17PM -0500, Max Reitz wrote:
> >>diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
> >>index 8e618b5..4e1996c 100644
> >>--- a/tests/qemu-iotests/common.qemu
> >>+++ b/tests/qemu-iotests/common.qemu
> >>@@ -187,13 +187,23 @@ function _launch_qemu()
> >>  # Silenty kills the QEMU process
> >>+#
> >>+# If $wait is set to anything other than the empty string, the process will not
> >>+# be killed but only waited for, and any output will be forwarded to stdout. If
> >>+# $wait is empty, the process will be killed and all output will be suppressed.
> >>  function _cleanup_qemu()
> >>  {
> >>      # QEMU_PID[], QEMU_IN[], QEMU_OUT[] all use same indices
> >>      for i in "${!QEMU_OUT[@]}"
> >>      do
> >>-        kill -KILL ${QEMU_PID[$i]} 2>/dev/null
> >>+        if [ -z "${wait}" ]; then
> >Is the global variable (with a common name) necessary?
> >
> >function _cleanup_qemu()
> >{
> >     wait=$1
> >...
> >
> >_cleanup_qemu
> >OR
> >_cleanup_qemu --wait
> 
> Well, it's probably not necessary, but it conforms with the _launch_qemu
> ($qemu_comm_method), the _send_qemu_cmd ($qemu_error_not_set), and the
> _timed_wait_for ($silent) interfaces.

Okay, let's stay consistent.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-02-09 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 21:06 [Qemu-devel] [PATCH v2 0/3] nbd: Drop BDS backpointer Max Reitz
2015-02-06 21:06 ` [Qemu-devel] [PATCH v2 1/3] " Max Reitz
2015-02-09 12:33   ` Paolo Bonzini
2015-02-06 21:06 ` [Qemu-devel] [PATCH v2 2/3] iotests: Add "wait" functionality to _cleanup_qemu Max Reitz
2015-02-09 15:01   ` Stefan Hajnoczi
2015-02-09 15:37     ` Max Reitz
2015-02-09 17:49       ` Stefan Hajnoczi [this message]
2015-02-06 21:06 ` [Qemu-devel] [PATCH v2 3/3] iotests: Add test for drive-mirror with NBD target Max Reitz
2015-02-09 17:54 ` [Qemu-devel] [PATCH v2 0/3] nbd: Drop BDS backpointer Stefan Hajnoczi

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=20150209174904.GE18233@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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).