mirror of https://gitee.com/openkylin/qemu.git
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 @@ def run_job(self, job, auto_finalize=True, auto_dismiss=False,
|
||||||
error = j['error']
|
error = j['error']
|
||||||
if use_log:
|
if use_log:
|
||||||
log('Job failed: %s' % (j['error']))
|
log('Job failed: %s' % (j['error']))
|
||||||
|
elif status == 'ready':
|
||||||
|
self.qmp_log('job-complete', id=job)
|
||||||
elif status == 'pending' and not auto_finalize:
|
elif status == 'pending' and not auto_finalize:
|
||||||
if pre_finalize:
|
if pre_finalize:
|
||||||
pre_finalize()
|
pre_finalize()
|
||||||
|
|
Loading…
Reference in New Issue