]> Git Repo - qemu.git/commitdiff
qemu-iotests: avoid spurious failure on test 109
authorPaolo Bonzini <[email protected]>
Wed, 9 Nov 2016 16:20:07 +0000 (17:20 +0100)
committerJeff Cody <[email protected]>
Tue, 15 Nov 2016 03:47:34 +0000 (22:47 -0500)
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 <[email protected]>
Message-id: 20161109162008[email protected]
Reviewed-by: Jeff Cody <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
tests/qemu-iotests/109

index 280ed27aa9e253f562c77c97024fc8b48dad2d1b..927151a2856b4f53f87257c511b00f96a1c3186c 100755 (executable)
@@ -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
 }
This page took 0.024398 seconds and 4 git commands to generate.