mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 14:24:02 +08:00
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>
This commit is contained in:
parent
55824e0980
commit
4688c4e32e
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user