From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2k4o-0004n5-5o for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:00:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2k4h-0004kH-Ks for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:00:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2k4h-0004k4-DJ for qemu-devel@nongnu.org; Wed, 29 Feb 2012 09:00:11 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1TE09mQ004000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 09:00:09 -0500 From: Kevin Wolf Date: Wed, 29 Feb 2012 15:03:39 +0100 Message-Id: <1330524219-15690-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] qemu-iotests: Test rebase with short backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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 --- tests/qemu-iotests/028 | 5 +++++ tests/qemu-iotests/028.out | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028 index 07c5bb6..b091ba9 100755 --- a/tests/qemu-iotests/028 +++ b/tests/qemu-iotests/028 @@ -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 diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out index f429029..fe00788 100644 --- a/tests/qemu-iotests/028.out +++ b/tests/qemu-iotests/028.out @@ -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 -- 1.7.6.5