All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109
Date: Wed, 9 Nov 2016 13:21:42 -0500	[thread overview]
Message-ID: <20161109182142.GF6315@localhost.localdomain> (raw)
In-Reply-To: <20161109162008.27287-1-pbonzini@redhat.com>

On Wed, Nov 09, 2016 at 05:20:07PM +0100, Paolo Bonzini wrote:
> In some cases it is possible that query-io-status is called just
> before the job is completed, causing
> 
>     -{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "src", "len": 31457280, "offset": OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}}
>     -{"return": []}
>     +{"return": [{"io-status": "ok", "device": "src", "busy": true, "len": 31457280, "offset": OFFSET, "paused": false, "speed": 0, "ready": false, "type": "mirror"}]}
> 
> Assert that the completeion event eventually happens.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  tests/qemu-iotests/109 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109
> index 280ed27..927151a 100755
> --- a/tests/qemu-iotests/109
> +++ b/tests/qemu-iotests/109
> @@ -62,6 +62,9 @@ function run_qemu()
>          "return"
>  
>      _send_qemu_cmd $QEMU_HANDLE '' "$qmp_event"
> +    if test "$qmp_event" = BLOCK_JOB_ERROR; then
> +        _send_qemu_cmd $QEMU_HANDLE '' "BLOCK_JOB_COMPLETED"
> +    fi
>      _send_qemu_cmd $QEMU_HANDLE '{"execute":"query-block-jobs"}' "return"
>      _cleanup_qemu
>  }
> -- 
> 2.9.3
> 
>
Thanks,

Reviewed-by: Jeff Cody <jcody@redhat.com>

  reply	other threads:[~2016-11-09 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-09 16:20 [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109 Paolo Bonzini
2016-11-09 18:21 ` Jeff Cody [this message]
2016-11-09 18:40 ` Jeff Cody

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=20161109182142.GF6315@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.