On 11/20/19 12:45 PM, Kevin Wolf wrote:
Signed-off-by: Kevin Wolf <kw...@redhat.com> --- tests/qemu-iotests/274 | 141 +++++++++++++++++++++ tests/qemu-iotests/274.out | 227 ++++++++++++++++++++++++++++++++++ tests/qemu-iotests/group | 1 + tests/qemu-iotests/iotests.py | 2 +- 4 files changed, 370 insertions(+), 1 deletion(-) create mode 100755 tests/qemu-iotests/274 create mode 100644 tests/qemu-iotests/274.out
+ iotests.log('=== Testing QMP active commit (top -> mid) ===') + + create_chain() + with create_vm() as vm: + vm.launch() + vm.qmp_log('block-commit', device='top', base_node='mid', + job_id='job0', auto_dismiss=False) + vm.run_job('job0', wait=5) + + iotests.img_info_log(mid) + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid) + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid) +
Would it also be worth testing a commit of mid -> base, and showing that top still sees the same contents afterwards?
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org