qemu-iotests: avoid spurious failure on test 109
commit0a4c0c3f90c3fb0239cb17d63a68c14742965a1c
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2016 16:20:07 +0000 (9 17:20 +0100)
committerJeff Cody <jcody@redhat.com>
Tue, 15 Nov 2016 03:47:34 +0000 (14 22:47 -0500)
tree10dad205c7f17f831b138a641ef7e13cce5ad4b9
parent0aef09b9c916e8824cabc55a7fd2ca1609b94810
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>
tests/qemu-iotests/109