[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL for-2.8 07/13] qemu-iotests: avoid spurious failure o

From: Jeff Cody
Subject: [Qemu-devel] [PULL for-2.8 07/13] qemu-iotests: avoid spurious failure on test 109
Date: Mon, 14 Nov 2016 23:14:45 -0500

From: Paolo Bonzini <address@hidden>

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 
    -{"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 <address@hidden>
Message-id: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Jeff Cody <address@hidden>
 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()
     _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"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]