]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests: Support job-complete in run_job()
authorKevin Wolf <kwolf@redhat.com>
Tue, 19 Nov 2019 17:38:21 +0000 (18:38 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 18 Dec 2019 10:21:16 +0000 (11:21 +0100)
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>
tests/qemu-iotests/iotests.py

index 0ac3ad4b040c90ab31725c9b9a2baaec318b179c..b46d298766254d1cd3a6b30a179bc16e8454bb65 100644 (file)
@@ -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()