[PULL,11/30] iotests: Support job-complete in run_job()
diff mbox series

Message ID 20191219172441.7289-12-kwolf@redhat.com
State New
Headers show
  • [PULL,01/30] iotests: Provide a function for checking the creation of huge files
Related show

Commit Message

Kevin Wolf Dec. 19, 2019, 5:24 p.m. UTC
Automatically complete jobs that have a 'ready' state and need an
explicit job-complete. Without this, run_job() would hang for such

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>
 tests/qemu-iotests/iotests.py | 2 ++
 1 file changed, 2 insertions(+)

diff mbox series

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 0ac3ad4b04..b46d298766 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: