aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-11-19 18:38:21 +0100
committerKevin Wolf <kwolf@redhat.com>2019-12-18 11:21:16 +0100
commit4688c4e32ec76004676470f11734478799673d6d (patch)
tree0ac3f5a61ffb699347bbf71b25a569e4ad335170 /tests/qemu-iotests
parent55824e0980f9cfe36a90d2d2acb7bb1ef8c41c39 (diff)
downloadqemu-4688c4e32ec76004676470f11734478799673d6d.zip
qemu-4688c4e32ec76004676470f11734478799673d6d.tar.gz
qemu-4688c4e32ec76004676470f11734478799673d6d.tar.bz2
iotests: Support job-complete in run_job()
Automatically complete jobs that have a 'ready' state and need an explicit job-complete. Without this, run_job() would hang for such jobs. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rw-r--r--tests/qemu-iotests/iotests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 0ac3ad4..b46d298 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -622,6 +622,8 @@ class VM(qtest.QEMUQtestMachine):
error = j['error']
if use_log:
log('Job failed: %s' % (j['error']))
+ elif status == 'ready':
+ self.qmp_log('job-complete', id=job)
elif status == 'pending' and not auto_finalize:
if pre_finalize:
pre_finalize()