qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/3] iotests: Add "wait" functionality to _cl


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 2/3] iotests: Add "wait" functionality to _cleanup_qemu
Date: Mon, 9 Feb 2015 17:49:04 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

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 "address@hidden"
> >>      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: pgpeNmuEq1CEW.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]