diff options
author | Vladimir Sementsov-Ogievskiy | 2021-01-16 22:47:04 +0100 |
---|---|---|
committer | Max Reitz | 2021-01-26 14:36:37 +0100 |
commit | b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd (patch) | |
tree | c8daeaefe4fe1962fc0b92d0cbc8b87ab6c1201a /scripts/simplebench/bench_block_job.py | |
parent | simplebench/bench_block_job: use correct shebang line with python3 (diff) | |
download | qemu-b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd.tar.gz qemu-b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd.tar.xz qemu-b2fcb0c5754c2554b8406376e99a75e9e0a6b7bd.zip |
simplebench: bench_block_job: add cmd_options argument
Add argument to allow additional block-job options.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210116214705.822267-23-vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'scripts/simplebench/bench_block_job.py')
-rwxr-xr-x | scripts/simplebench/bench_block_job.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/simplebench/bench_block_job.py b/scripts/simplebench/bench_block_job.py index a0dda1dc4e..7332845c1c 100755 --- a/scripts/simplebench/bench_block_job.py +++ b/scripts/simplebench/bench_block_job.py @@ -78,16 +78,19 @@ def bench_block_job(cmd, cmd_args, qemu_args): # Bench backup or mirror -def bench_block_copy(qemu_binary, cmd, source, target): +def bench_block_copy(qemu_binary, cmd, cmd_options, source, target): """Helper to run bench_block_job() for mirror or backup""" assert cmd in ('blockdev-backup', 'blockdev-mirror') source['node-name'] = 'source' target['node-name'] = 'target' - return bench_block_job(cmd, - {'job-id': 'job0', 'device': 'source', - 'target': 'target', 'sync': 'full'}, + cmd_options['job-id'] = 'job0' + cmd_options['device'] = 'source' + cmd_options['target'] = 'target' + cmd_options['sync'] = 'full' + + return bench_block_job(cmd, cmd_options, [qemu_binary, '-blockdev', json.dumps(source), '-blockdev', json.dumps(target)]) |