From patchwork Wed Apr 17 12:58:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 237213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2ED012C014E for ; Wed, 17 Apr 2013 22:59:35 +1000 (EST) Received: from localhost ([::1]:57565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USRxV-0005od-Aw for incoming@patchwork.ozlabs.org; Wed, 17 Apr 2013 08:59:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USRxA-0005oB-PK for qemu-devel@nongnu.org; Wed, 17 Apr 2013 08:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USRx1-000530-RO for qemu-devel@nongnu.org; Wed, 17 Apr 2013 08:59:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USRx1-00052J-Ix for qemu-devel@nongnu.org; Wed, 17 Apr 2013 08:59:03 -0400 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 r3HCx18P006326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Apr 2013 08:59:02 -0400 Received: from localhost.localdomain.com ([10.66.7.14]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3HCwx0j029375; Wed, 17 Apr 2013 08:59:00 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 17 Apr 2013 20:58:58 +0800 Message-Id: <1366203538-28104-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, Fam Zheng , stefanha@redhat.com Subject: [Qemu-devel] [PATCH] qemu-iotests: Test subformats for vmdk 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 Added format options for testing vmdk subformats: $ ./check -h Usage: ./check [options] [testlist] common options -v verbose check options ... -vpc test vpc -vmdk test vmdk (identical to -vmdk-monolithicSparse) -vmdk-monolithicSparse test vmdk monolithic sparse -vmdk-monolithicFlat test vmdk monolithic flat -vmdk-twoGbMaxExtentSparse test vmdk two gb splitted sparse -vmdk-twoGbMaxExtentFlat test vmdk two gb splitted sparse -rbd test rbd ... Signed-off-by: Fam Zheng --- tests/qemu-iotests/common | 31 +++++++++++++++++++++++++++++-- tests/qemu-iotests/common.rc | 4 ++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index b3aad89..b7f23bf 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -133,7 +133,15 @@ check options -qed test qed -vdi test vdi -vpc test vpc - -vmdk test vmdk + -vmdk test vmdk (identical to -vmdk-monolithicSparse) + -vmdk-monolithicSparse + test vmdk monolithic sparse + -vmdk-monolithicFlat + test vmdk monolithic flat + -vmdk-twoGbMaxExtentSparse + test vmdk two gb splitted sparse + -vmdk-twoGbMaxExtentFlat + test vmdk two gb splitted sparse -rbd test rbd -sheepdog test sheepdog -nbd test nbd @@ -184,8 +192,27 @@ testlist options xpand=false ;; - -vmdk) + -vmdk|-vmdk-monolithicSparse) IMGFMT=vmdk + export SUBFMT=monolithicSparse + xpand=false + ;; + + -vmdk-monolithicFlat) + IMGFMT=vmdk + export SUBFMT=monolithicFlat + xpand=false + ;; + + -vmdk-twoGbMaxExtentSparse) + IMGFMT=vmdk + export SUBFMT=twoGbMaxExtentSparse + xpand=false + ;; + + -vmdk-twoGbMaxExtentFlat) + IMGFMT=vmdk + export SUBFMT=twoGbMaxExtentFlat xpand=false ;; diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index e522d61..d786319 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -108,6 +108,9 @@ _make_test_img() if [ \( "$IMGFMT" = "qcow2" -o "$IMGFMT" = "qed" \) -a -n "$CLUSTER_SIZE" ]; then optstr=$(_optstr_add "$optstr" "cluster_size=$CLUSTER_SIZE") fi + if [ -n "$SUBFMT" ]; then + optstr=$(_optstr_add "$optstr" "subformat=$SUBFMT") + fi if [ -n "$optstr" ]; then extra_img_options="-o $optstr $extra_img_options" @@ -124,6 +127,7 @@ _make_test_img() -e "s# compat='[^']*'##g" \ -e "s# compat6=\\(on\\|off\\)##g" \ -e "s# static=\\(on\\|off\\)##g" \ + -e "s# subformat='[^']*'##g" \ -e "s# lazy_refcounts=\\(on\\|off\\)##g" # Start an NBD server on the image file, which is what we'll be talking to