From patchwork Fri Jan 22 03:06:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 8087521 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 45B1CBEEE5 for ; Fri, 22 Jan 2016 03:14:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DB5E20457 for ; Fri, 22 Jan 2016 03:14:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF3AA20456 for ; Fri, 22 Jan 2016 03:14:24 +0000 (UTC) Received: from localhost ([::1]:50591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMSB6-00080P-3m for patchwork-qemu-devel@patchwork.kernel.org; Thu, 21 Jan 2016 22:14:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMS5c-0005ei-8O for qemu-devel@nongnu.org; Thu, 21 Jan 2016 22:08:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMS5X-0000sa-HK for qemu-devel@nongnu.org; Thu, 21 Jan 2016 22:08:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMS5S-0000ri-5q; Thu, 21 Jan 2016 22:08:34 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E3EC6C0ED41A; Fri, 22 Jan 2016 03:08:33 +0000 (UTC) Received: from fam-t430.nay.redhat.com. (dhcp-15-42.nay.redhat.com [10.66.15.42]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0M36bCn030633; Thu, 21 Jan 2016 22:08:28 -0500 From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 22 Jan 2016 11:06:36 +0800 Message-Id: <1453431996-27764-16-git-send-email-famz@redhat.com> In-Reply-To: <1453431996-27764-1-git-send-email-famz@redhat.com> References: <1453431996-27764-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , qemu-block@nongnu.org, mreitz@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com Subject: [Qemu-devel] [PATCH v7 15/15] iotests: Add "qemu-img map" test for VMDK extents X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 10 ++++++++++ tests/qemu-iotests/059.out | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059 index 0ded0c3..261d8b0 100755 --- a/tests/qemu-iotests/059 +++ b/tests/qemu-iotests/059 @@ -133,6 +133,16 @@ $QEMU_IO -c "write -P 0xa 900G 512" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "read -v 900G 1024" "$TEST_IMG" | _filter_qemu_io echo +echo "=== Testing qemu-img map on extents ===" +for fmt in twoGbMaxExtentSparse twoGbMaxExtentFlat; do + IMGOPTS="subformat=$fmt" _make_test_img 31G + $QEMU_IO -c "write 65024 1k" "$TEST_IMG" | _filter_qemu_io + $QEMU_IO -c "write 2147483136 1k" "$TEST_IMG" | _filter_qemu_io + $QEMU_IO -c "write 5G 1k" "$TEST_IMG" | _filter_qemu_io + $QEMU_IMG map "$TEST_IMG" | _filter_testdir +done + +echo echo "=== Testing afl image with a very large capacity ===" _use_sample_img afl9.vmdk.bz2 _img_info diff --git a/tests/qemu-iotests/059.out b/tests/qemu-iotests/059.out index 9d506cb..9f5e5cc 100644 --- a/tests/qemu-iotests/059.out +++ b/tests/qemu-iotests/059.out @@ -2335,6 +2335,44 @@ e1000003f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ read 1024/1024 bytes at offset 966367641600 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +=== Testing qemu-img map on extents === +Formatting 'TEST_DIR/iotest-version3.IMGFMT', fmt=IMGFMT size=33285996544 subformat=twoGbMaxExtentSparse +wrote 1024/1024 bytes at offset 65024 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1024/1024 bytes at offset 2147483136 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1024/1024 bytes at offset 5368709120 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Offset Length Mapped to File +0 0x20000 0x50000 TEST_DIR/iotest-version3-s001.vmdk +0x7fff0000 0x10000 0x70000 TEST_DIR/iotest-version3-s001.vmdk +0x80000000 0x10000 0x50000 TEST_DIR/iotest-version3-s002.vmdk +0x140000000 0x10000 0x50000 TEST_DIR/iotest-version3-s003.vmdk +Formatting 'TEST_DIR/iotest-version3.IMGFMT', fmt=IMGFMT size=33285996544 subformat=twoGbMaxExtentFlat +wrote 1024/1024 bytes at offset 65024 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1024/1024 bytes at offset 2147483136 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 1024/1024 bytes at offset 5368709120 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Offset Length Mapped to File +0 0x80000000 0 TEST_DIR/iotest-version3-f001.vmdk +0x80000000 0x80000000 0 TEST_DIR/iotest-version3-f002.vmdk +0x100000000 0x80000000 0 TEST_DIR/iotest-version3-f003.vmdk +0x180000000 0x80000000 0 TEST_DIR/iotest-version3-f004.vmdk +0x200000000 0x80000000 0 TEST_DIR/iotest-version3-f005.vmdk +0x280000000 0x80000000 0 TEST_DIR/iotest-version3-f006.vmdk +0x300000000 0x80000000 0 TEST_DIR/iotest-version3-f007.vmdk +0x380000000 0x80000000 0 TEST_DIR/iotest-version3-f008.vmdk +0x400000000 0x80000000 0 TEST_DIR/iotest-version3-f009.vmdk +0x480000000 0x80000000 0 TEST_DIR/iotest-version3-f010.vmdk +0x500000000 0x80000000 0 TEST_DIR/iotest-version3-f011.vmdk +0x580000000 0x80000000 0 TEST_DIR/iotest-version3-f012.vmdk +0x600000000 0x80000000 0 TEST_DIR/iotest-version3-f013.vmdk +0x680000000 0x80000000 0 TEST_DIR/iotest-version3-f014.vmdk +0x700000000 0x80000000 0 TEST_DIR/iotest-version3-f015.vmdk +0x780000000 0x40000000 0 TEST_DIR/iotest-version3-f016.vmdk + === Testing afl image with a very large capacity === qemu-img: Can't get size of device 'image': File too large *** done