aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/109
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-11-09 17:20:07 +0100
committerJeff Cody <jcody@redhat.com>2016-11-14 22:47:34 -0500
commit0a4c0c3f90c3fb0239cb17d63a68c14742965a1c (patch)
tree10dad205c7f17f831b138a641ef7e13cce5ad4b9 /tests/qemu-iotests/109
parent0aef09b9c916e8824cabc55a7fd2ca1609b94810 (diff)
qemu-iotests: avoid spurious failure on test 109
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> Message-id: 20161109162008.27287-1-pbonzini@redhat.com Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/109')
-rwxr-xr-xtests/qemu-iotests/1093
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109
index 280ed27aa9..927151a285 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
}