diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-02-19 18:16:14 +0300 |
---|---|---|
committer | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-05-04 11:37:26 +0300 |
commit | 4ad7a5c06535d36d955928cac0352be13cf6f712 (patch) | |
tree | 8a5157bed48baf63acce01d478e22748c26738e6 /scripts/simplebench | |
parent | 684d18efd1a35b75a6625072c68e1b7ea70bd3a8 (diff) |
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>
Diffstat (limited to 'scripts/simplebench')
-rwxr-xr-x | scripts/simplebench/bench_block_job.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/bench_block_job.py index 8f8385ccce..71d2e489c8 100755 --- a/scripts/simplebench/bench_block_job.py +++ b/scripts/simplebench/bench_block_job.py @@ -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: |