qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-iotests: Test subformats for vmdk
@ 2013-04-17 12:58 Fam Zheng
  2013-04-17 13:06 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Fam Zheng @ 2013-04-17 12:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Fam Zheng, stefanha

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 <famz@redhat.com>
---
 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
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-18  2:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 12:58 [Qemu-devel] [PATCH] qemu-iotests: Test subformats for vmdk Fam Zheng
2013-04-17 13:06 ` Kevin Wolf
2013-04-18  2:26   ` Fam Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).