]> git.proxmox.com Git - qemu.git/commitdiff
qemu-iotests: Test rebase with short backing file
authorKevin Wolf <kwolf@redhat.com>
Wed, 15 Feb 2012 14:03:25 +0000 (15:03 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 29 Feb 2012 14:48:44 +0000 (15:48 +0100)
This tests that qemu-img rebase doesn't assume that the backing file has
the same size as the image, but considers that it can be smaller.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
tests/qemu-iotests/028
tests/qemu-iotests/028.out

index 07c5bb6975af518769e5e0be2c7a70392212f33b..b091ba9f075c367b52d885ec7718320b5716b04d 100755 (executable)
@@ -96,6 +96,11 @@ io_zero readv $(( offset + 32 * 1024 )) 512 1024 32
 
 _check_test_img
 
+# Rebase it on top of its base image
+$QEMU_IMG rebase -b $TEST_IMG.base $TEST_IMG
+
+_check_test_img
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
index f4290298c86e3123654417f006bae55677004a52..fe007887e32eefa92e067d4ccb895ec1dc257601 100644 (file)
@@ -465,4 +465,5 @@ qemu-io> read 512/512 bytes at offset 3221257728
 qemu-io> read 512/512 bytes at offset 3221258752
 512.000000 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 qemu-io> No errors were found on the image.
+No errors were found on the image.
 *** done