From patchwork Wed Feb 24 16:21:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 587528 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EE5C214030C for ; Thu, 25 Feb 2016 03:22:42 +1100 (AEDT) Received: from localhost ([::1]:36747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYcD2-0001FP-Vq for incoming@patchwork.ozlabs.org; Wed, 24 Feb 2016 11:22:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYcCU-0000Ah-F3 for qemu-devel@nongnu.org; Wed, 24 Feb 2016 11:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYcCP-0002uu-NA for qemu-devel@nongnu.org; Wed, 24 Feb 2016 11:22:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYcCL-0002tw-5W; Wed, 24 Feb 2016 11:21:57 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id D2A82166381; Wed, 24 Feb 2016 16:21:56 +0000 (UTC) Received: from localhost (ovpn-112-42.phx2.redhat.com [10.3.112.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1OGLtF7025020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO); Wed, 24 Feb 2016 11:21:56 -0500 From: Jeff Cody To: qemu-block@nongnu.org Date: Wed, 24 Feb 2016 11:21:46 -0500 Message-Id: <8cdbb82ee5048b4eba7a109f3bc7fbf239cc42cc.1456330357.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 24 Feb 2016 16:21:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, pl@kamp.de, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH v2 4/4] block/vpc: add tests for image creation force_size parameter 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Jeff Cody --- tests/qemu-iotests/146 | 52 ++++++++++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/146.out | 32 ++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) diff --git a/tests/qemu-iotests/146 b/tests/qemu-iotests/146 index 14579ec..6603c61 100755 --- a/tests/qemu-iotests/146 +++ b/tests/qemu-iotests/146 @@ -87,6 +87,58 @@ echo ${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map' +_cleanup_test_img + +echo +echo === Testing Image create, default === +echo + +TEST_IMG="${TEST_DIR}/vpc-create-test.vpc" + +_make_test_img 4G + +echo +echo === Read created image, default opts ==== +echo + +${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map' + +echo +echo === Read created image, force_size_calc=chs ==== +echo + +${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map' + +echo +echo === Read created image, force_size_calc=current_size ==== +echo + +${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map' + +echo +echo === Testing Image create, force_size === +echo + +_make_test_img -o force_size 4G + +echo +echo === Read created image, default opts ==== +echo + +${QEMU_IO} -c "open -o driver=vpc ${TEST_IMG}" -c 'map' + +echo +echo === Read created image, force_size_calc=chs ==== +echo + +${QEMU_IO} -c "open -o driver=vpc,force_size_calc=chs ${TEST_IMG}" -c 'map' + +echo +echo === Read created image, force_size_calc=current_size ==== +echo + +${QEMU_IO} -c "open -o driver=vpc,force_size_calc=current_size ${TEST_IMG}" -c 'map' + echo "*** done" rm -f $seq.full diff --git a/tests/qemu-iotests/146.out b/tests/qemu-iotests/146.out index 47b2eb2..831bee8 100644 --- a/tests/qemu-iotests/146.out +++ b/tests/qemu-iotests/146.out @@ -23,4 +23,36 @@ QA output created by 146 === Testing Hyper-V with chs force === [ 0] 266334240/ 266334240 sectors not allocated at offset 0 bytes (0) + +=== Testing Image create, default === + +Formatting 'TEST_DIR/IMGFMT-create-test.IMGFMT', fmt=IMGFMT size=4294967296 + +=== Read created image, default opts ==== + +[ 0] 8389584/ 8389584 sectors not allocated at offset 0 bytes (0) + +=== Read created image, force_size_calc=chs ==== + +[ 0] 8389584/ 8389584 sectors not allocated at offset 0 bytes (0) + +=== Read created image, force_size_calc=current_size ==== + +[ 0] 8389584/ 8389584 sectors not allocated at offset 0 bytes (0) + +=== Testing Image create, force_size === + +Formatting 'TEST_DIR/IMGFMT-create-test.IMGFMT', fmt=IMGFMT size=4294967296 force_size=on + +=== Read created image, default opts ==== + +[ 0] 8388608/ 8388608 sectors not allocated at offset 0 bytes (0) + +=== Read created image, force_size_calc=chs ==== + +[ 0] 8389584/ 8389584 sectors not allocated at offset 0 bytes (0) + +=== Read created image, force_size_calc=current_size ==== + +[ 0] 8388608/ 8388608 sectors not allocated at offset 0 bytes (0) *** done