* [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109
@ 2016-11-09 16:20 Paolo Bonzini
2016-11-09 18:21 ` Jeff Cody
2016-11-09 18:40 ` Jeff Cody
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-11-09 16:20 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-block, jsnow, jcody
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109
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
2016-11-09 18:40 ` Jeff Cody
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Cody @ 2016-11-09 18:21 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-block, jsnow
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.8] qemu-iotests: avoid spurious failure on test 109
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
@ 2016-11-09 18:40 ` Jeff Cody
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Cody @ 2016-11-09 18:40 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-block, jsnow
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,
Applied to my block branch:
git://github.com/codyprime/qemu-kvm-jtc.git block
-Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-09 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2016-11-09 18:40 ` Jeff Cody
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.