From d1fde4ad3c22137f8e589e625c21bf2ea7f6ba62 Mon Sep 17 00:00:00 2001 From: Jeff Cody Date: Wed, 25 Jun 2014 16:55:31 -0400 Subject: block: add qemu-iotest for resize base during live commit If 'base' is smaller than the overlay image being committed into it, then the base image will be grown in commit_run via bdrv_truncate(). This tests to make sure that this works, and the bdrv_truncate() is not blocked when it shouldn't be. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/095.out | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/qemu-iotests/095.out (limited to 'tests/qemu-iotests/095.out') diff --git a/tests/qemu-iotests/095.out b/tests/qemu-iotests/095.out new file mode 100644 index 0000000000..5864ddac2b --- /dev/null +++ b/tests/qemu-iotests/095.out @@ -0,0 +1,31 @@ +QA output created by 095 +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5242880 +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file='TEST_DIR/t.IMGFMT.base' +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=104857600 backing_file='TEST_DIR/t.IMGFMT.snp1' + +=== Base image info before commit and resize === +image: TEST_DIR/t.qcow2.base +file format: qcow2 +virtual size: 5.0M (5242880 bytes) +disk size: 196K +cluster_size: 65536 +Format specific information: + compat: 1.1 + lazy refcounts: false + +=== Running QEMU Live Commit Test === + +{"return": {}} +{"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "test", "len": 104857600, "offset": 104857600, "speed": 0, "type": "commit"}} + +=== Base image info after commit and resize === +image: TEST_DIR/t.qcow2.base +file format: qcow2 +virtual size: 100M (104857600 bytes) +disk size: 196K +cluster_size: 65536 +Format specific information: + compat: 1.1 + lazy refcounts: false +*** done -- cgit v1.2.3-55-g7522