qemu-iotests: Test subformats for vmdk
PATCH 1/1 qemu-iotests: Test subformats for vmdk
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
...
--- tests/qemu-iotests/common | 31 +++++++++++++++++++++++++++++-- tests/qemu-iotests/common.rc | 4 ++++ 2 files changed, 33 insertions(+), 2 deletions(-)
tests/qemu-iotests/common +29 -2
@@ -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 ;;
tests/qemu-iotests/common.rc +4 -0
@@ -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
Signature · 1 line
1.8.1.4
Am 17.04.2013 um 14:58 hat Fam Zheng geschrieben:
Quoted 23 lines
Added format options for testing vmdk subformats:
$ ./check -h Usage: ./check [options] [testlist]common options
-v verbosecheck 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
...
Quoted 1 line
Signed-off-by Fam Zheng <[email protected]>
Shouldn't -o be enough to cover all of this? For example, we're also running qcow2 tests with -o compat=[0.10|1.1] and don't introduce a separate option for each.
In practice, of course, the problem is that the non-default is rarely run. Maybe we should add a tests/qemu-iotest-slow.sh that covers some more combinations.
tests/qemu-iotests/common.rc _make_test_img() · line 133
Quoted 8 lines
tests/qemu-iotests/common.rc +1
-0@@ -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
This hunk we'll need in any case, of course.
Kevin
Quoted 24 lines · Kevin Wolf
Am 17.04.2013 um 14:58 hat Fam Zheng geschrieben:
Quoted 23 lines
Added format options for testing vmdk subformats:
$ ./check -h Usage: ./check [options] [testlist]common options
-v verbosecheck 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
...
Quoted 5 lines
Quoted 1 line
Signed-off-by Fam Zheng <[email protected]>Shouldn't -o be enough to cover all of this? For example, we're also running qcow2 tests with -o compat=[0.10|1.1] and don't introduce a separate option for each.
Agreed, OK.
Quoted 11 lines
tests/qemu-iotests/common.rc _make_test_img() · line 133
Quoted 9 lines
tests/qemu-iotests/common.rc +1
-0@@ -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 toThis hunk we'll need in any case, of course.
OK.
I'll include this later in with more VMDK tests.
Signature · 1 line
Fam