[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 48/53] simplebench: bench_block_job: add cmd_options argument
From: |
Max Reitz |
Subject: |
[PULL 48/53] simplebench: bench_block_job: add cmd_options argument |
Date: |
Tue, 26 Jan 2021 15:20:11 +0100 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
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>
---
scripts/simplebench/bench-example.py | 2 +-
scripts/simplebench/bench_block_job.py | 11 +++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/scripts/simplebench/bench-example.py
b/scripts/simplebench/bench-example.py
index d9c7f7bc17..4864435f39 100644
--- a/scripts/simplebench/bench-example.py
+++ b/scripts/simplebench/bench-example.py
@@ -25,7 +25,7 @@ from bench_block_job import bench_block_copy, drv_file,
drv_nbd
def bench_func(env, case):
""" Handle one "cell" of benchmarking table. """
- return bench_block_copy(env['qemu_binary'], env['cmd'],
+ return bench_block_copy(env['qemu_binary'], env['cmd'], {}
case['source'], case['target'])
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)])
--
2.29.2
- [PULL 32/53] block/block-copy: add block_copy_cancel, (continued)
- [PULL 32/53] block/block-copy: add block_copy_cancel, Max Reitz, 2021/01/26
- [PULL 36/53] iotests: 56: prepare for backup over block-copy, Max Reitz, 2021/01/26
- [PULL 37/53] iotests/129: Limit backup's max-chunk/max-workers, Max Reitz, 2021/01/26
- [PULL 38/53] iotests: 185: prepare for backup over block-copy, Max Reitz, 2021/01/26
- [PULL 39/53] iotests: 219: prepare for backup over block-copy, Max Reitz, 2021/01/26
- [PULL 40/53] iotests: 257: prepare for backup over block-copy, Max Reitz, 2021/01/26
- [PULL 41/53] block/block-copy: make progress_bytes_callback optional, Max Reitz, 2021/01/26
- [PULL 42/53] block/backup: drop extra gotos from backup_run(), Max Reitz, 2021/01/26
- [PULL 43/53] backup: move to block-copy, Max Reitz, 2021/01/26
- [PULL 44/53] qapi: backup: disable copy_range by default, Max Reitz, 2021/01/26
- [PULL 48/53] simplebench: bench_block_job: add cmd_options argument,
Max Reitz <=
- [PULL 45/53] block/block-copy: drop unused block_copy_set_progress_callback(), Max Reitz, 2021/01/26
- [PULL 49/53] simplebench: add bench-backup.py, Max Reitz, 2021/01/26
- [PULL 47/53] simplebench/bench_block_job: use correct shebang line with python3, Max Reitz, 2021/01/26
- [PULL 46/53] block/block-copy: drop unused argument of block_copy(), Max Reitz, 2021/01/26
- [PULL 50/53] block: report errno when flock fcntl fails, Max Reitz, 2021/01/26
- [PULL 52/53] iotests/118: Drop 'change' test, Max Reitz, 2021/01/26
- [PULL 51/53] iotests: Add test for the regression fixed in c8bf9a9169, Max Reitz, 2021/01/26
- [PULL 53/53] iotests/178: Pass value to invalid option, Max Reitz, 2021/01/26
- Re: [PULL 00/53] Block patches, Peter Maydell, 2021/01/27