aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-04-10 22:16:19 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-04-10 22:16:19 +0100
commit26d6a7c87b05017ffabffb5e16837a0fccf67e90 (patch)
tree802fcece5cbe575f0d6bac29cc359e46fffad6c4 /tests
parent69550301ecb3f0e5b9e2cc502aecb9411cdc5816 (diff)
parent951702f39c7e31530ce4ea65b11fe25ea1ea9c37 (diff)
downloadqemu-26d6a7c87b05017ffabffb5e16837a0fccf67e90.zip
qemu-26d6a7c87b05017ffabffb5e16837a0fccf67e90.tar.gz
qemu-26d6a7c87b05017ffabffb5e16837a0fccf67e90.tar.bz2
Merge remote-tracking branch 'remotes/ericb/tags/pull-qapi-2018-04-10' into staging
qapi patches for 2018-04-10 - Peter Xu: iotests: fix wait_until_completed() - Peter Xu: iothread: workaround glib bug which hangs qmp-test - Peter Xu: monitor: bind dispatch bh to iohandler context # gpg: Signature made Tue 10 Apr 2018 14:15:09 BST # gpg: using RSA key A7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" # gpg: aka "[jpeg image of size 6874]" # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-qapi-2018-04-10: monitor: bind dispatch bh to iohandler context iothread: workaround glib bug which hangs qmp-test iotests: fix wait_until_completed() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index b5d7945..119c8e2 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -470,18 +470,15 @@ class QMPTestCase(unittest.TestCase):
def wait_until_completed(self, drive='drive0', check_offset=True):
'''Wait for a block job to finish, returning the event'''
- completed = False
- while not completed:
+ while True:
for event in self.vm.get_qmp_events(wait=True):
if event['event'] == 'BLOCK_JOB_COMPLETED':
self.assert_qmp(event, 'data/device', drive)
self.assert_qmp_absent(event, 'data/error')
if check_offset:
self.assert_qmp(event, 'data/offset', event['data']['len'])
- completed = True
-
- self.assert_no_active_block_jobs()
- return event
+ self.assert_no_active_block_jobs()
+ return event
def wait_ready(self, drive='drive0'):
'''Wait until a block job BLOCK_JOB_READY event'''