summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/274
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2020-09-24 21:40:03 +0200
committerStefan Hajnoczi2020-10-23 14:42:16 +0200
commit4f193168af097ef664287f4c801724f063a60fc2 (patch)
treef3d1cc0acc33b594e23bba6d47d5b93cc30d4d02 /tests/qemu-iotests/274
parentblock/io: fix bdrv_is_allocated_above (diff)
downloadqemu-4f193168af097ef664287f4c801724f063a60fc2.tar.gz
qemu-4f193168af097ef664287f4c801724f063a60fc2.tar.xz
qemu-4f193168af097ef664287f4c801724f063a60fc2.zip
iotests: add commit top->base cases to 274
These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20200924194003.22080-6-vsementsov@virtuozzo.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/274')
-rwxr-xr-xtests/qemu-iotests/27420
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274
index d4571c5465..76b1ba6a52 100755
--- a/tests/qemu-iotests/274
+++ b/tests/qemu-iotests/274
@@ -115,6 +115,26 @@ with iotests.FilePath('base') as base, \
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)
+ iotests.log('=== Testing qemu-img commit (top -> base) ===')
+
+ create_chain()
+ iotests.qemu_img_log('commit', '-b', base, top)
+ iotests.img_info_log(base)
+ iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, base)
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), base)
+
+ iotests.log('=== Testing QMP active commit (top -> base) ===')
+
+ create_chain()
+ with create_vm() as vm:
+ vm.launch()
+ vm.qmp_log('block-commit', device='top', base_node='base',
+ 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, base)
+ iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), base)
iotests.log('== Resize tests ==')