From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPaBH-0001Z7-31 for qemu-devel@nongnu.org; Fri, 27 Sep 2013 11:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPaBA-0000BI-5t for qemu-devel@nongnu.org; Fri, 27 Sep 2013 11:42:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPaB9-0000B6-Sv for qemu-devel@nongnu.org; Fri, 27 Sep 2013 11:42:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8RFg3iw007028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 27 Sep 2013 11:42:03 -0400 From: Kevin Wolf Date: Fri, 27 Sep 2013 17:39:24 +0200 Message-Id: <1380296370-14523-25-git-send-email-kwolf@redhat.com> In-Reply-To: <1380296370-14523-1-git-send-email-kwolf@redhat.com> References: <1380296370-14523-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 24/30] qemu-iotests: Preallocated zero clusters in 061 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Max Reitz Add a test case for zero cluster expansion on an image completely filled with preallocated zero clusters to test 061. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/061 | 9 +++++++++ tests/qemu-iotests/061.out | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061 index 5f04bfa..fa9319d 100755 --- a/tests/qemu-iotests/061 +++ b/tests/qemu-iotests/061 @@ -200,6 +200,15 @@ $QEMU_IMG snapshot -a foo "$TEST_IMG" _check_test_img $QEMU_IO -c "read -P 0 0 128k" "$TEST_IMG" | _filter_qemu_io +echo +echo "=== Testing preallocated zero expansion on full image ===" +echo +IMGOPTS="compat=1.1" TEST_IMG="$TEST_IMG" _make_test_img 64M +$QEMU_IO -c "write -P 0x2a 0 64M" "$TEST_IMG" -c "write -z 0 64M" | _filter_qemu_io +$QEMU_IMG amend -o "compat=0.10" "$TEST_IMG" +_check_test_img +$QEMU_IO -c "read -P 0 0 64M" "$TEST_IMG" | _filter_qemu_io + # success, all done echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out index d42127f..4027e00 100644 --- a/tests/qemu-iotests/061.out +++ b/tests/qemu-iotests/061.out @@ -373,4 +373,15 @@ read 131072/131072 bytes at offset 0 No errors were found on the image. read 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +=== Testing preallocated zero expansion on full image === + +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 +wrote 67108864/67108864 bytes at offset 0 +64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 67108864/67108864 bytes at offset 0 +64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +No errors were found on the image. +read 67108864/67108864 bytes at offset 0 +64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** done -- 1.8.1.4