simplebench/bench_block_job: handle error in BLOCK_JOB_COMPLETED
We should not report success if there is an error in final event. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
684d18efd1
commit
4ad7a5c065
@ -70,6 +70,10 @@ def bench_block_job(cmd, cmd_args, qemu_args):
|
||||
vm.shutdown()
|
||||
return {'error': 'block-job failed: ' + str(e),
|
||||
'vm-log': vm.get_log()}
|
||||
if 'error' in e['data']:
|
||||
vm.shutdown()
|
||||
return {'error': 'block-job failed: ' + e['data']['error'],
|
||||
'vm-log': vm.get_log()}
|
||||
end_ms = e['timestamp']['seconds'] * 1000000 + \
|
||||
e['timestamp']['microseconds']
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user