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

[Xen-changelog] [qemu-xen master] qemu-iotests: avoid spurious failure on test 109



commit 0a4c0c3f90c3fb0239cb17d63a68c14742965a1c
Author:     Paolo Bonzini <pbonzini@xxxxxxxxxx>
AuthorDate: Wed Nov 9 17:20:07 2016 +0100
Commit:     Jeff Cody <jcody@xxxxxxxxxx>
CommitDate: Mon Nov 14 22:47:34 2016 -0500

    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@xxxxxxxxxx>
    Message-id: 20161109162008.27287-1-pbonzini@xxxxxxxxxx
    Reviewed-by: Jeff Cody <jcody@xxxxxxxxxx>
    Signed-off-by: Jeff Cody <jcody@xxxxxxxxxx>
---
 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
 }
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.