qemu-iotests: adjust tests to work with the NFS protocol
v2 cover qemu-iotests: adjust tests to work with the NFS protocol
In order to proceed with the integration of the NFS protocol driver into qemu I was asked by Stefan to add integration for NFS into the qemu-iotests.
Unfortunately, this became more complex than I had expected because most of the tests for non RAW formats only work with the file protocol because they use shell commands like cp, rm or mv which obviously don't work on nfs:// URLs.
This series first changes all those tests that are not working out of the box to support only the file protocol.
After the NFS protocol is introduced in Patch 2 I fix most of them to work with any protocol.
After this series the qemu-iotests for NFS run through gracefully with the RAW, QCOW2 and VMDK formats.
There are 3 topics open:
- test 051 fails regardless which protocol is used (I already send a msg to the list)
- test 052 should work, but it seems there is a bug in the bdrv_open logic if the BDRV_O_SNAPSHOT flag is set and the protocol is anything else than file. Maybe someone with more understanding of the whole open logic could look at this. I do not believe that its sth which has to do with the NFS driver since the test fails while opening the backing file and other backing file tests run without problems.
- other protocols like sheepdog or ssh that are allowed to use other formats than raw should be tested. they actually can't never have run qemu-iotests with qcow2 protocol for instance.
If you want to do your tests please make sure to have
[PATCHv5] block: add native support for NFS [PATCH v2] vmdk: Allow vmdk_create to work with protocol
Peter
Peter Lieven (18):
qemu-iotests: change _supported_proto to file for various tests
qemu-iotests: enable support for NFS protocol
qemu-iotests: enable test 016 and 025 to work with NFS protocol
qemu-iotests: fix test 013 to work with any protocol
qemu-iotests: fix tests 014 and 023 to work with any protocol
qemu-iotests: fix test 018 to work with any protocol
qemu-iotests: fix test 019 to work with any protocol
qemu-iotests: fix test 020 to work with any protocol
qemu-iotests: fix test 024 to work with any protocol
qemu-iotests: fix test 028 to work with any protocol
qemu-iotests: fix test 034 to work with any protocol
qemu-iotests: fix test 037 to work with any protocol
qemu-iotests: fix test 038 to work with any protocol
qemu-iotests: fix test 043 to work with any protocol
qemu-iotests: fix test 046 to work with any protocol
qemu-iotests: fix expected output of test 067
qemu-iotests: blacklist test 020 for NFS protocol
qemu-iotests: test 026 store blkdebug.cfg locally
tests/qemu-iotests/013 | 7 +++---- tests/qemu-iotests/013.out | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/018 | 20 ++++++++------------ tests/qemu-iotests/018.out | 4 ++-- tests/qemu-iotests/019 | 28 +++++++++++++--------------- tests/qemu-iotests/019.out | 4 ++-- tests/qemu-iotests/020 | 27 +++++++++++++++------------ tests/qemu-iotests/020.out | 2 +- tests/qemu-iotests/023 | 9 ++++----- tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/024 | 10 ++++------ tests/qemu-iotests/024.out | 4 ++-- tests/qemu-iotests/025 | 2 +- tests/qemu-iotests/026 | 18 ++++++++++++------ tests/qemu-iotests/028 | 7 +++---- tests/qemu-iotests/028.out | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/034 | 5 ++--- tests/qemu-iotests/034.out | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 7 ++----- tests/qemu-iotests/037.out | 2 +- tests/qemu-iotests/038 | 7 +++---- tests/qemu-iotests/038.out | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/043 | 22 +++++++++------------- tests/qemu-iotests/043.out | 12 ++++++------ tests/qemu-iotests/046 | 7 ++----- tests/qemu-iotests/046.out | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/067.out | 8 ++++---- tests/qemu-iotests/069 | 2 +- tests/qemu-iotests/common | 22 +++++++++++++++++++--- tests/qemu-iotests/common.pattern | 7 +++---- tests/qemu-iotests/common.rc | 3 +++ 43 files changed, 150 insertions(+), 146 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/18 qemu-iotests: change _supported_proto to file for various tests
all these tests do anything of the following and thus fail with any protocol other than file:
- the tests use rm, cp or mv shell commands which only work on file
- the tests use qcow2.py
- the images construct new filenames (e.g. backing file names) and the logic is broken for anything else than file
We fix some of these later to work with generic protocol.
--- tests/qemu-iotests/013 | 2 +- tests/qemu-iotests/014 | 2 +- tests/qemu-iotests/018 | 2 +- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/020 | 2 +- tests/qemu-iotests/023 | 2 +- tests/qemu-iotests/024 | 2 +- tests/qemu-iotests/026 | 2 +- tests/qemu-iotests/028 | 2 +- tests/qemu-iotests/031 | 2 +- tests/qemu-iotests/034 | 2 +- tests/qemu-iotests/036 | 2 +- tests/qemu-iotests/037 | 2 +- tests/qemu-iotests/038 | 2 +- tests/qemu-iotests/039 | 2 +- tests/qemu-iotests/043 | 2 +- tests/qemu-iotests/046 | 2 +- tests/qemu-iotests/052 | 2 +- tests/qemu-iotests/054 | 2 +- tests/qemu-iotests/059 | 2 +- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/061 | 2 +- tests/qemu-iotests/063 | 2 +- tests/qemu-iotests/069 | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-)
tests/qemu-iotests/013 +1 -1
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/014 +1 -1
@@ -43,7 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/018 +1 -1
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/019 +1 -1
@@ -45,7 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/020 +1 -1
@@ -43,7 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/023 +1 -1
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux TEST_OFFSETS="0 4294967296"
tests/qemu-iotests/024 +1 -1
@@ -43,7 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 and qed support rebasing _supported_fmt qcow2 qed -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=65536
tests/qemu-iotests/026 +1 -1
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 supports rebasing _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux _default_cache_mode "writethrough" _supported_cache_modes "writethrough" "none"
tests/qemu-iotests/028 +1 -1
@@ -45,7 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files except vmdk and qcow which do not support # smaller backing files. _supported_fmt qcow2 qed -_supported_proto generic +_supported_proto file _supported_os Linux # Choose a size that is not necessarily a cluster size multiple for image
tests/qemu-iotests/031 +1 -1
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # This tests qcow2-specific low-level functionality _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=65536
tests/qemu-iotests/034 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=4k
tests/qemu-iotests/036 +1 -1
@@ -44,7 +44,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # This tests qcow2-specific low-level functionality _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux # Only qcow2v3 and later supports feature bits
tests/qemu-iotests/037 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow qcow2 vmdk qed -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=4k
tests/qemu-iotests/038 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 qed -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=2M
tests/qemu-iotests/039 +1 -1
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux _default_cache_mode "writethrough" _supported_cache_modes "writethrough"
tests/qemu-iotests/043 +1 -1
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow2 qed -_supported_proto generic +_supported_proto file _supported_os Linux
tests/qemu-iotests/046 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux CLUSTER_SIZE=64k
tests/qemu-iotests/052 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt generic -_supported_proto generic +_supported_proto file _supported_os Linux _default_cache_mode "writethrough" _supported_cache_modes "writethrough"
tests/qemu-iotests/054 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux echo
tests/qemu-iotests/059 +1 -1
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # This tests vmdk-specific low-level functionality _supported_fmt vmdk -_supported_proto generic +_supported_proto file _supported_os Linux capacity_offset=16
tests/qemu-iotests/060 +1 -1
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # This tests qocw2-specific low-level functionality _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux rt_offset=65536 # 0x10000 (XXX: just an assumption)
tests/qemu-iotests/061 +1 -1
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # This tests qocw2-specific low-level functionality _supported_fmt qcow2 -_supported_proto generic +_supported_proto file _supported_os Linux echo
tests/qemu-iotests/063 +1 -1
@@ -42,7 +42,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.pattern _supported_fmt qcow qcow2 vmdk qed raw -_supported_proto generic +_supported_proto file _supported_os Linux _make_test_img 4M
tests/qemu-iotests/069 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt cow qed qcow qcow2 vmdk -_supported_proto generic +_supported_proto file _supported_os Linux IMG_SIZE=128K
Signature · 1 line
1.7.9.5
PATCH v2 2/18 qemu-iotests: enable support for NFS protocol
In reply to Peter Lieven--- tests/qemu-iotests/common | 22 +++++++++++++++++++--- tests/qemu-iotests/common.rc | 3 +++ 2 files changed, 22 insertions(+), 3 deletions(-)
tests/qemu-iotests/common +19 -3
@@ -144,10 +144,12 @@ check options -vpc test vpc -vhdx test vhdx -vmdk test vmdk + -file test file (default) -rbd test rbd -sheepdog test sheepdog -nbd test nbd -ssh test ssh + -nfs test nfs -xdiff graphical mode diff -nocache use O_DIRECT on backing file -misalign misalign memory allocations
@@ -211,22 +213,36 @@ testlist options xpand=false ;; + -file) + IMGFMT=file + xpand=false + ;; + -rbd) IMGPROTO=rbd xpand=false ;; + -sheepdog) IMGPROTO=sheepdog xpand=false ;; + -nbd) IMGPROTO=nbd xpand=false ;; + -ssh) IMGPROTO=ssh xpand=false ;; + + -nfs) + IMGPROTO=nfs + xpand=false + ;; + -nocache) CACHEMODE="none" CACHEMODE_IS_DEFAULT=false
@@ -238,10 +254,10 @@ testlist options xpand=false ;; - -valgrind) - valgrind=true + -valgrind) + valgrind=true xpand=false - ;; + ;; -g) # -g group ... pick from group file group=true
tests/qemu-iotests/common.rc +3 -0
@@ -61,6 +61,9 @@ elif [ "$IMGPROTO" = "nbd" ]; then elif [ "$IMGPROTO" = "ssh" ]; then TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT TEST_IMG="ssh://127.0.0.1$TEST_IMG_FILE" +elif [ "$IMGPROTO" = "nfs" ]; then + TEST_DIR="nfs://127.0.0.1/$TEST_DIR" + TEST_IMG=$TEST_DIR/t.$IMGFMT else TEST_IMG=$IMGPROTO:$TEST_DIR/t.$IMGFMT fi
Signature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol
Quoted 24 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/common | 22 +++++++++++++++++++--- tests/qemu-iotests/common.rc | 3 +++ 2 files changed, 22 insertions(+), 3 deletions(-)tests/qemu-iotests/common +2
-0@@ -144,10 +144,12 @@ check options -vpc test vpc -vhdx test vhdx -vmdk test vmdk + -file test file (default) -rbd test rbd -sheepdog test sheepdog -nbd test nbd -ssh test ssh + -nfs test nfs -xdiff graphical mode diff -nocache use O_DIRECT on backing file -misalign misalign memory allocations
tests/qemu-iotests/common testlist options · line 217
Quoted 5 lines
tests/qemu-iotests/common +2
-0@@ -211,22 +213,36 @@ testlist options xpand=false ;; + -file) + IMGFMT=file
This should be IMGPROTO, right?
Quoted 62 lines
tests/qemu-iotests/common +15
-3+ xpand=false + ;; + -rbd) IMGPROTO=rbd xpand=false ;; + -sheepdog) IMGPROTO=sheepdog xpand=false ;; + -nbd) IMGPROTO=nbd xpand=false ;; + -ssh) IMGPROTO=ssh xpand=false ;; + + -nfs) + IMGPROTO=nfs + xpand=false + ;; + -nocache) CACHEMODE="none" CACHEMODE_IS_DEFAULT=false@@ -238,10 +254,10 @@ testlist options xpand=false ;; - -valgrind) - valgrind=true + -valgrind) + valgrind=true xpand=false - ;; + ;; -g) # -g group ... pick from group file group=truetests/qemu-iotests/common.rc +3
-0@@ -61,6 +61,9 @@ elif [ "$IMGPROTO" = "nbd" ]; then elif [ "$IMGPROTO" = "ssh" ]; then TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT TEST_IMG="ssh://127.0.0.1$TEST_IMG_FILE" +elif [ "$IMGPROTO" = "nfs" ]; then + TEST_DIR="nfs://127.0.0.1/$TEST_DIR" + TEST_IMG=$TEST_DIR/t.$IMGFMT else TEST_IMG=$IMGPROTO:$TEST_DIR/t.$IMGFMT fiSignature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol
Quoted 32 lines
Am 06.01.2014 um 21:14 schrieb Jeff Cody <[email protected]>:
Quoted 28 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>---
tests/qemu-iotests/common | 22 +++++++++++++++++++---
tests/qemu-iotests/common.rc | 3 +++2 files changed, 22 insertions(+), 3 deletions(-)tests/qemu-iotests/common +2
-0@@ -144,10 +144,12 @@ check options -vpc test vpc -vhdx test vhdx -vmdk test vmdk + -file test file (default) -rbd test rbd -sheepdog test sheepdog -nbd test nbd -ssh test ssh + -nfs test nfs -xdiff graphical mode diff -nocache use O_DIRECT on backing file -misalign misalign memory allocations@@ -211,22 +213,36 @@ testlist options xpand=false ;;
Quoted 4 lines
tests/qemu-iotests/common testlist options · line 217
Quoted 2 lines
tests/qemu-iotests/common +2
-0+ -file) + IMGFMT=fileThis should be IMGPROTO, right?
of course, you are right. its not necessary at all because the check script does not complain about unknown options, but i added it in the sake of completeness.
Peter
Quoted 63 lines
Quoted 63 lines
tests/qemu-iotests/common +15
-3+ xpand=false + ;; + -rbd) IMGPROTO=rbd xpand=false ;; + -sheepdog) IMGPROTO=sheepdog xpand=false ;; + -nbd) IMGPROTO=nbd xpand=false ;; + -ssh) IMGPROTO=ssh xpand=false ;; + + -nfs) + IMGPROTO=nfs + xpand=false + ;; + -nocache) CACHEMODE="none" CACHEMODE_IS_DEFAULT=false@@ -238,10 +254,10 @@ testlist options xpand=false ;; - -valgrind) - valgrind=true + -valgrind) + valgrind=true xpand=false - ;; + ;; -g) # -g group ... pick from group file group=truetests/qemu-iotests/common.rc +0
-0@@ -61,6 +61,9 @@ elif [ "$IMGPROTO" = "nbd" ]; thenelif [ "$IMGPROTO" = "ssh" ]; then
TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT TEST_IMG="ssh://127.0.0.1$TEST_IMG_FILE"tests/qemu-iotests/common.rc +3
-0+elif [ "$IMGPROTO" = "nfs" ]; then + TEST_DIR="nfs://127.0.0.1/$TEST_DIR" + TEST_IMG=$TEST_DIR/t.$IMGFMTelse
TEST_IMG=$IMGPROTO:$TEST_DIR/t.$IMGFMT
fiSignature · 1 line
1.7.9.5
PATCH v2 3/18 qemu-iotests: enable test 016 and 025 to work with NFS protocol
In reply to Peter Lieven--- tests/qemu-iotests/016 | 2 +- tests/qemu-iotests/025 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tests/qemu-iotests/016 +1 -1
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt raw -_supported_proto file sheepdog +_supported_proto file sheepdog nfs _supported_os Linux
tests/qemu-iotests/025 +1 -1
@@ -40,7 +40,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.pattern _supported_fmt raw qcow2 qed -_supported_proto file sheepdog rbd +_supported_proto file sheepdog rbd nfs _supported_os Linux echo "=== Creating image"
Signature · 1 line
1.7.9.5
PATCH v2 4/18 qemu-iotests: fix test 013 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
tests/qemu-iotests/013 +4 -5
@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image" echo
@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"
tests/qemu-iotests/013.out +1 -1
@@ -1,5 +1,5 @@ QA output created by 013 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image At offset 0:
Signature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 12 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 50
Quoted 10 lines
tests/qemu-iotests/013 +1
-1# much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096
I think dropping these three TEST_IMG overriding change...
tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
tests/qemu-iotests/013 +1
-1echo "Testing empty image" echo@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8
#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img
#3
tests/qemu-iotests/013 echo · line 68
Quoted 7 lines
tests/qemu-iotests/013 +0
-1done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig"
and changing this to
TEST_IMG=$TEST_IMG.orig _make_test_img 6G
Should work.
tests/qemu-iotests/013.out line 2
Quoted 11 lines
tests/qemu-iotests/013 +0
-0$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"tests/qemu-iotests/013.out +1
-1@@ -1,5 +1,5 @@ QA output created by 013 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944
So this is not necessary.
Fam
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 55 lines · Fam Zheng
Quoted 12 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 50
Quoted 10 lines
tests/qemu-iotests/013 +1
-1# much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
tests/qemu-iotests/013 +1
-1echo "Testing empty image" echo@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
Quoted 6 lines
tests/qemu-iotests/013 +0
-0done echo "Compressing image" echo
Quoted 7 lines
tests/qemu-iotests/013 echo · line 68
Quoted 1 line
tests/qemu-iotests/013 +0
-1-mv "$TEST_IMG" "$TEST_IMG.orig"and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6GShould work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is io_test, _check_test_img and the cleanup at the end.
There are 3 options:
- override it in every line that should use an alternate $TEST_IMG
- save the original $TEST_IMG and restore it.
- rework all commands to take the file as parameter and not use a global variable for it.
I choosed the first one because it makes clear which $TEST_IMG is acutally used. You see from the output and the code that you are dealing with the file that is later used as $TEST_IMG.orig. If you see $TEST_IMG there you can't distinguish if its the backing or original file or the actual image.
But I thought that this would be controversal. This is I why I splitted the patch into individual ones. So its possible to drop all these patches and still be able to proceed with the integration of the NFS protocol driver.
Quoted 15 lines
tests/qemu-iotests/013.out line 2
Quoted 12 lines
tests/qemu-iotests/013 +0
-0$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"tests/qemu-iotests/013.out +1
-1@@ -1,5 +1,5 @@ QA output created by 013 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944So this is not necessary.
Quoted 1 line
Fam
Peter
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 58 lines · Peter Lieven
Quoted 57 lines · Fam Zheng
Quoted 12 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 50
Quoted 10 lines
tests/qemu-iotests/013 +1
-1# much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
tests/qemu-iotests/013 +1
-1echo "Testing empty image" echo@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
Quoted 7 lines
tests/qemu-iotests/013 +0
-1done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig"
Quoted 9 lines
Quoted 5 lines
and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6GShould work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is
io_test,_check_test_imgand the cleanup at the end.
Why? The overriding is temporary and subsequent commands are not affected.
My proposal above doesn't work, though, because an empty new image doesn't contain the right data, what is needed here is copy. So maybe change the "mv" line to:
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT "$TEST_IMG" "$TEST_IMG.orig"
could do the work, but I'm not sure if this fits every case.
Quoted 11 lines
There are 3 options:
- override it in every line that should use an alternate $TEST_IMG
- save the original $TEST_IMG and restore it.
- rework all commands to take the file as parameter and not use a global variable for it.I choosed the first one because it makes clear which $TEST_IMG is acutally used. You see from the output and the code that you are dealing with the file that is later used as $TEST_IMG.orig. If you see $TEST_IMG there you can't distinguish if its the backing or original file or the actual image.
Quoted 5 lines
But I thought that this would be controversal. This is I why I splitted the patch
into individual ones. So its possible to drop all these patches and still be able
to proceed with the integration of the NFS protocol driver.
I'll leave maintainers to decide.
Fam
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 63 lines · Fam Zheng
Quoted 62 lines · Peter Lieven
Quoted 61 lines · Fam Zheng
Quoted 12 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 50
Quoted 10 lines
tests/qemu-iotests/013 +1
-1# much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
tests/qemu-iotests/013 +1
-1echo "Testing empty image" echo@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
tests/qemu-iotests/013 echo · line 68
Quoted 7 lines
tests/qemu-iotests/013 +0
-1done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig"and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6G
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Should work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is
io_test,_check_test_imgand the cleanup at the end.Why? The overriding is temporary and subsequent commands are not affected.
If you put in a singe
TEST_IMG=$TEST_IMG.orig
line, this affects all further commands in the same test script.
If you put the TEST_IMG=$TEST_IMG.orig before a command it affectes only this single command.
Quoted 6 lines
My proposal above doesn't work, though, because an empty new image doesn't contain the right data, what is needed here is copy. So maybe change the "mv" line to:
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT "$TEST_IMG" "$TEST_IMG.orig"
could do the work, but I'm not sure if this fits every case.
This is unnecessary (copy) overhead and in some cases it could falsify the test. The convert process does not guarantee to create identical copies. You could use raw format, but in this case the image can only be a multiple of 512 byte.
Quoted 12 lines
Quoted 12 lines
There are 3 options:
- override it in every line that should use an alternate $TEST_IMG
- save the original $TEST_IMG and restore it.
- rework all commands to take the file as parameter and not use a global variable for it.I choosed the first one because it makes clear which $TEST_IMG is acutally used. You see from the output and the code that you are dealing with the file that is later used as $TEST_IMG.orig. If you see $TEST_IMG there you can't distinguish if its the backing or original file or the actual image.
Quoted 7 lines
Quoted 5 lines
But I thought that this would be controversal. This is I why I splitted the patch
into individual ones. So its possible to drop all these patches and still be able
to proceed with the integration of the NFS protocol driver.I'll leave maintainers to decide.
That is the best. I from my perspective have checked that the NFS driver is working great and provided fixes for a lot of tests to make the iotests work with NFS and QCOW2/VMDK. Most of the tests are there to test the formats actually and errors are likely to happen with every protocol. I would be totally fine if maintainers pick up patches 1,2,3,16,17 and leave the rest as is.
Peter
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 87 lines · Peter Lieven
Quoted 64 lines · Fam Zheng
Quoted 63 lines · Peter Lieven
Quoted 62 lines · Fam Zheng
Quoted 16 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supportingcompression.
_supported_fmtqcow qcow2tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 49
Quoted 7 lines
tests/qemu-iotests/013 +1
-1-_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
echo "Testing empty image"
echotests/qemu-iotests/013 +1
-1@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
tests/qemu-iotests/013 echo · line 68
Quoted 7 lines
tests/qemu-iotests/013 +0
-1done echo "Compressing image" echo -mv "$TEST_IMG" "$TEST_IMG.orig"and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6GQuoted 8 lines
Quoted 5 lines
Quoted 1 line
Should work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is
io_test,_check_test_imgand the cleanup at the end.Why? The overriding is temporary and subsequent commands are not affected.
If you put in a singe
TEST_IMG=$TEST_IMG.orig
line, this affects all further commands in the same test script.
If you put the TEST_IMG=$TEST_IMG.orig before a command it affectes only this single command.
Quoted 5 lines
My proposal above doesn't work, though, because an empty new image doesn't contain the right data, what is needed here is copy. So maybe change the "mv" line to:
Quoted 8 lines
Quoted 3 lines
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT "$TEST_IMG" "$TEST_IMG.orig"
could do the work, but I'm not sure if this fits every case.
This is unnecessary (copy) overhead and in some cases it could falsify the test. The convert process
does not guarantee to create identical copies. You could use raw format, but in this case the image
can only be a multiple of 512 byte.
OK, thanks for clarification.
Fam
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
In reply to Peter LievenQuoted 73 lines · Peter Lieven
Quoted 55 lines · Fam Zheng
Quoted 12 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 50
Quoted 10 lines
tests/qemu-iotests/013 +1
-1# much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
tests/qemu-iotests/013 +1
-1echo "Testing empty image" echo@@ -56,16 +56,15 @@ echo for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
tests/qemu-iotests/013 +1
-1done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
Quoted 6 lines
tests/qemu-iotests/013 +0
-0done echo "Compressing image" echoQuoted 7 lines
tests/qemu-iotests/013 echo · line 68
Quoted 1 line
tests/qemu-iotests/013 +0
-1-mv "$TEST_IMG" "$TEST_IMG.orig"and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6GShould work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is
io_test,_check_test_imgand the cleanup at the end.There are 3 options:
- override it in every line that should use an alternate $TEST_IMG
- save the original $TEST_IMG and restore it.
- rework all commands to take the file as parameter and not use a global variable for it.
Quoted 4 lines
I choosed the first one because it makes clear which $TEST_IMG is acutally used. You see from the output and the code that you are dealing with the file that is later used as $TEST_IMG.orig. If you see $TEST_IMG there you can't distinguish if its the backing or original file or the actual image.
There more I've read through the patches, my opinion is that something more along the lines of option #3 would be best. If that is done, it may be nice for the file to be an optional argument to the function. That way, for tests that only support IMGPROTO=file, the current default operation does not need to change.
My fear is the current method (#1) seems a bit unwieldy; I foresee scripts often forgetting to do these manual override steps. Then again, the default IMGPROTO was set to 'file', so perhaps my fear is unfounded.
Quoted 21 lines
But I thought that this would be controversal. This is I why I splitted the patch into individual ones. So its possible to drop all these patches and still be able to proceed with the integration of the NFS protocol driver.
Quoted 15 lines
tests/qemu-iotests/013.out line 2
Quoted 12 lines
tests/qemu-iotests/013 +0
-0$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"tests/qemu-iotests/013.out +1
-1@@ -1,5 +1,5 @@ QA output created by 013 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944So this is not necessary.
Quoted 1 line
Fam
Peter
Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
Quoted 88 lines
Am 06.01.2014 um 21:40 schrieb Jeff Cody <[email protected]>:
Quoted 73 lines · Peter Lieven
Quoted 55 lines · Fam Zheng
Quoted 19 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>---
tests/qemu-iotests/013 | 9 ++++----- tests/qemu-iotests/013.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)tests/qemu-iotests/013 +0
-0@@ -41,14 +41,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression.
_supported_fmtqcow qcow2tests/qemu-iotests/013 +1
-1-_supported_proto file +_supported_proto generic
_supported_osLinuxQuoted 3 lines
TEST_OFFSETS="0 4294967296"
TEST_OPS="writev read write readv"
CLUSTER_SIZE=4096I think dropping these three
TEST_IMGoverriding change...tests/qemu-iotests/013 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 51
Quoted 2 lines
tests/qemu-iotests/013 +1
-1-_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G#1
tests/qemu-iotests/013 echo · line 59
Quoted 9 lines
echo "Testing empty image"
echotests/qemu-iotests/013 +0
-0@@ -56,16 +56,15 @@ echofor offset in $TEST_OFFSETS; do
echo "At offset $offset:"
for op in $TEST_OPS; dotests/qemu-iotests/013 +1
-1- io_test $op $offset $CLUSTER_SIZE 8 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 8#2
tests/qemu-iotests/013 echo · line 61
Quoted 3 lines
done
tests/qemu-iotests/013 +1
-1- _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img#3
Quoted 6 lines
done
echo "Compressing image"
echoQuoted 7 lines
Quoted 1 line
-mv "$TEST_IMG" "$TEST_IMG.orig"
and changing this to
TEST_IMG=$TEST_IMG.orig
_make_test_img6GShould work.
Unfortunately it doesn't. All subsequent commands will then work on $TEST_IMG.orig altough they shouldn't. In case of 013 this is
io_test,_check_test_imgand the cleanup at the end.There are 3 options:
- override it in every line that should use an alternate $TEST_IMG
- save the original $TEST_IMG and restore it.
- rework all commands to take the file as parameter and not use a global variable for it.Quoted 4 lines
I choosed the first one because it makes clear which $TEST_IMG is acutally used. You see from the output and the code that you are dealing with the file that is later used as $TEST_IMG.orig. If you see $TEST_IMG there you can't distinguish if its the backing or original file or the actual image.
There more I've read through the patches, my opinion is that something more along the lines of option #3 would be best. If that is done, it may be nice for the file to be an optional argument to the function. That way, for tests that only support IMGPROTO=file, the current default operation does not need to change.
Quoted 4 lines
My fear is the current method (#1) seems a bit unwieldy; I foresee scripts often forgetting to do these manual override steps. Then again, the default IMGPROTO was set to 'file', so perhaps my fear is unfounded.
another question would be if we really want that all these tests work with all protocols. i think their main purpose is to test the IMGFORMAT, but maybe they could help to trigger subtile bugs in IMGPROTO != file that the more generic tests don't...
Quoted 22 lines
Quoted 22 lines
But I thought that this would be controversal. This is I why I splitted the patch into individual ones. So its possible to drop all these patches and still be able to proceed with the integration of the NFS protocol driver.
Quoted 15 lines
tests/qemu-iotests/013.out line 2
Quoted 12 lines
$QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
echo "Testing compressed image"
tests/qemu-iotests/013.out +0
-0@@ -1,5 +1,5 @@QA output created by 013
tests/qemu-iotests/013.out +1
-1-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944So this is not necessary.
Quoted 1 line
Fam
Peter
PATCH v2 5/18 qemu-iotests: fix tests 014 and 023 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)
tests/qemu-iotests/014 +2 -2
@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; do
tests/qemu-iotests/014.out +1 -1
@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]
tests/qemu-iotests/023 +5 -6
@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"
@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo
@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"
@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echo
tests/qemu-iotests/023.out +8 -8
@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:
@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0
@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:
@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0
@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:
@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0
@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:
@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0
tests/qemu-iotests/common.pattern +3 -4
@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2] - io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clusters
Signature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Quoted 158 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:
tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns
The same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig _make_test_img 8G" without touching other parts.
Quoted 13 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +1
-1@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2]
tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 10 lines
tests/qemu-iotests/common.pattern +2
-3- io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clusters
Especially here, overriding TEST_IMG inside a utility function is not right.
Fam
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Quoted 187 lines · Fam Zheng
Quoted 158 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patternsThe same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig
_make_test_img8G" without touching other parts.Quoted 18 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +3
-3@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2] - io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165
Quoted 7 lines
tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 5 lines
tests/qemu-iotests/common.pattern +0
-1- mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clustersEspecially here, overriding
TEST_IMGinside a utility function is not right.
The problem is, that in its original form io_test2 only works with protocol file. Maybe its better to split io_test2 into 2 parts.
Peter
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
Quoted 191 lines · Fam Zheng
Quoted 190 lines · Peter Lieven
Quoted 158 lines
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patternsThe same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig
_make_test_img8G" without touching other parts.Quoted 21 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +3
-4@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2] - io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
Quoted 6 lines
Quoted 4 lines
tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 2 lines
tests/qemu-iotests/common.pattern +0
-0# Write the used clustersEspecially here, overriding
TEST_IMGinside a utility function is not right.The problem is, that in its original form
io_test2only works with protocol file. Maybe its better to splitio_test2into 2 parts.
Perhaps you should leave $TEST_IMG as it is and instead of using mv to move the old version away create a new one with a different name? I guess io_pattern would need to get a filename then, but that shouldn't be hard.
Kevin
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Am 10.01.2014 20:04, schrieb Kevin Wolf:
Quoted 194 lines
Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
Quoted 193 lines · Fam Zheng
Quoted 192 lines · Peter Lieven
Quoted 158 lines
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patternsThe same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig
_make_test_img8G" without touching other parts.Quoted 13 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +1
-1@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2]tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 10 lines
tests/qemu-iotests/common.pattern +2
-3- io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clustersEspecially here, overriding
TEST_IMGinside a utility function is not right.
Quoted 6 lines
Quoted 2 lines
The problem is, that in its original form
io_test2only works with protocol file. Maybe its better to splitio_test2into 2 parts.Perhaps you should leave $TEST_IMG as it is and instead of using mv to move the old version away create a new one with a different name? I guess
io_patternwould need to get a filename then, but that shouldn't be hard.
The problem is not only io_pattern, also all the other commands. Or are you just referring to the changes in io_test2 and are fine with the overrides outside a function?
Peter
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Am 10.01.2014 um 20:06 hat Peter Lieven geschrieben:
Quoted 195 lines
Am 10.01.2014 20:04, schrieb Kevin Wolf:
Quoted 194 lines
Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
Quoted 193 lines · Fam Zheng
Quoted 192 lines · Peter Lieven
Quoted 158 lines
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patternsThe same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig
_make_test_img8G" without touching other parts.Quoted 13 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +1
-1@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2]tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 10 lines
tests/qemu-iotests/common.pattern +2
-3- io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clustersEspecially here, overriding
TEST_IMGinside a utility function is not right.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
The problem is, that in its original form
io_test2only works with protocol file. Maybe its better to splitio_test2into 2 parts.Perhaps you should leave $TEST_IMG as it is and instead of using mv to move the old version away create a new one with a different name? I guess
io_patternwould need to get a filename then, but that shouldn't be hard.The problem is not only
io_pattern, also all the other commands. Or are you just referring to the changes inio_test2and are fine with the overrides outside a function?
I haven't looked at the full series yet, but yes, probably all the other functions in common.pattern as well.
In general, I think the primary test image should be $TEST_IMG, not $TEST_IMG.orig. Hiding the creation of a copy in common.pattern, after which $TEST_IMG becomes valid, doesn't make it easier to understand either.
Kevin
Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Am 10.01.2014 20:14, schrieb Kevin Wolf:
Quoted 204 lines
Am 10.01.2014 um 20:06 hat Peter Lieven geschrieben:
Quoted 195 lines
Am 10.01.2014 20:04, schrieb Kevin Wolf:
Quoted 194 lines
Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
Quoted 193 lines · Fam Zheng
Quoted 192 lines · Peter Lieven
Quoted 158 lines
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/014 | 4 ++-- tests/qemu-iotests/014.out | 2 +- tests/qemu-iotests/023 | 11 +++++------ tests/qemu-iotests/023.out | 16 ++++++++-------- tests/qemu-iotests/common.pattern | 7 +++---- 5 files changed, 19 insertions(+), 21 deletions(-)tests/qemu-iotests/014 +2
-2@@ -43,14 +43,14 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting snapshots _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" TEST_OPS="writev read write readv" CLUSTER_SIZE=4096 -_make_test_img 6G +TEST_IMG=$TEST_IMG.orig _make_test_img 6G echo "Testing empty image:" for offset in $TEST_OFFSETS; dotests/qemu-iotests/014.out +1
-1@@ -1,5 +1,5 @@ QA output created by 014 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 Testing empty image: test2: With offset 0 === Clusters to be compressed [1]tests/qemu-iotests/023 +5
-6@@ -41,7 +41,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # much of this could be generic for any format supporting compression. _supported_fmt qcow qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296"@@ -55,7 +55,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating new image; cluster size: $CLUSTER_SIZE" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "Testing empty image" echo@@ -63,15 +63,14 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do for offset in $TEST_OFFSETS; do echo "At offset $offset:" for op in $TEST_OPS; do - io_test $op $offset $CLUSTER_SIZE 3 + TEST_IMG=$TEST_IMG.orig io_test $op $offset $CLUSTER_SIZE 3 done - _check_test_img + TEST_IMG=$TEST_IMG.orig _check_test_img done echo "Compressing image" echo - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" echo "Testing compressed image"@@ -101,7 +100,7 @@ for CLUSTER_SIZE in $CLUSTER_SIZES; do echo "Creating another new image" echo - _make_test_img 8G + TEST_IMG=$TEST_IMG.orig _make_test_img 8G echo "More complex patterns" echotests/qemu-iotests/023.out +7
-7@@ -1,7 +1,7 @@ QA output created by 023 Creating new image; cluster size: 1024 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -5664,7 +5664,7 @@ read 3072/3072 bytes at offset 4295491072 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -5887,7 +5887,7 @@ read 2048/2048 bytes at offset 4295001088 No errors were found on the image. Creating new image; cluster size: 4096 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -12270,7 +12270,7 @@ read 12288/12288 bytes at offset 4301256704 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -12493,7 +12493,7 @@ read 8192/8192 bytes at offset 4295102464 No errors were found on the image. Creating new image; cluster size: 16384 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:@@ -18876,7 +18876,7 @@ read 49152/49152 bytes at offset 4395622400 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patterns test2: With offset 0@@ -19099,7 +19099,7 @@ read 32768/32768 bytes at offset 4295507968 No errors were found on the image. Creating new image; cluster size: 65536 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 Testing empty image At offset 0:tests/qemu-iotests/023.out read 196608/196608 bytes at offset 5905547264 · line 25487
Quoted 7 lines
tests/qemu-iotests/023.out +1
-1@@ -25482,7 +25482,7 @@ read 196608/196608 bytes at offset 5905547264 No errors were found on the image. Creating another new image -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=8589934592 +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=8589934592 More complex patternsThe same comment for this as for [04/18], there are two many overrides which are not necessary because you can replace "mv $TEST_IMG $TEST_IMG.orig" with "TEST_IMG=$TEST_IMG.orig
_make_test_img8G" without touching other parts.Quoted 13 lines
tests/qemu-iotests/023.out +0
-0test2: With offset 0tests/qemu-iotests/common.pattern +1
-1@@ -111,13 +111,12 @@ function io_test2() { # Write the clusters to be compressed echo === Clusters to be compressed [1] - io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [2]tests/qemu-iotests/common.pattern function io_test2() { · line 122
Quoted 10 lines
tests/qemu-iotests/common.pattern +2
-3- io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 echo === Clusters to be compressed [3] - io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 + TEST_IMG=$TEST_IMG.orig io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clustersEspecially here, overriding
TEST_IMGinside a utility function is not right.Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
The problem is, that in its original form
io_test2only works with protocol file. Maybe its better to splitio_test2into 2 parts.Perhaps you should leave $TEST_IMG as it is and instead of using mv to move the old version away create a new one with a different name? I guess
io_patternwould need to get a filename then, but that shouldn't be hard.The problem is not only
io_pattern, also all the other commands. Or are you just referring to the changes inio_test2and are fine with the overrides outside a function?
Quoted 7 lines
I haven't looked at the full series yet, but yes, probably all the other functions in common.pattern as well.
In general, I think the primary test image should be $TEST_IMG, not $TEST_IMG.orig. Hiding the creation of a copy in common.pattern, after which $TEST_IMG becomes valid, doesn't make it easier to understand either.
Maybe thats a little overkill just testing the NFS driver works. Its a rework of almost the whole test suite.
If you agree I would send an update with v6 of the NFS driver that just includes patch 1,2,3,16,17 of this series. This enables for basic testing of the driver. The indepth tests for the formats should trigger a bug on any protocol and I think its ok to test this with file.
Peter
PATCH v2 6/18 qemu-iotests: fix test 018 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/018 | 22 +++++++++------------- tests/qemu-iotests/018.out | 4 ++-- 2 files changed, 11 insertions(+), 15 deletions(-)
tests/qemu-iotests/018 +9 -13
@@ -41,46 +41,42 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" -TEST_IMG_SAVE=$TEST_IMG -TEST_IMG=$TEST_IMG.base -_make_test_img 6G +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io writev $(( offset )) 512 1024 64 + TEST_IMG=$TEST_IMG.base io writev $(( offset )) 512 1024 64 # Complete backing clusters - io writev $(( offset + 64 * 1024)) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io writev $(( offset + 64 * 1024)) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img echo "Creating test image with backing file" echo -TEST_IMG=$TEST_IMG_SAVE -_make_test_img -b "$TEST_IMG.base" 6G +TEST_IMG=$TEST_IMG.orig _make_test_img -b "$TEST_IMG.base" 6G echo "Filling test image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io writev $(( offset + 512 )) 512 1024 64 + TEST_IMG=$TEST_IMG.orig io writev $(( offset + 512 )) 512 1024 64 # Complete test image clusters - io writev $(( offset + 64 * 1024 + 65536)) 65536 65536 1 + TEST_IMG=$TEST_IMG.orig io writev $(( offset + 64 * 1024 + 65536)) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.orig _check_test_img -mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -O $IMGFMT "$TEST_IMG.orig" "$TEST_IMG" echo "Reading"
tests/qemu-iotests/018.out +2 -2
@@ -1,5 +1,5 @@ QA output created by 018 -Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 Filling base image === IO: pattern 0
@@ -269,7 +269,7 @@ wrote 65536/65536 bytes at offset 4295032832 No errors were found on the image. Creating test image with backing file -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file='TEST_DIR/t.IMGFMT.base' +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 backing_file='TEST_DIR/t.IMGFMT.base' Filling test image === IO: pattern 1
Signature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 to work with any protocol
Quoted 53 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- tests/qemu-iotests/018 | 22 +++++++++------------- tests/qemu-iotests/018.out | 4 ++-- 2 files changed, 11 insertions(+), 15 deletions(-)tests/qemu-iotests/018 +6
-10@@ -41,46 +41,42 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" -TEST_IMG_SAVE=$TEST_IMG -TEST_IMG=$TEST_IMG.base -_make_test_img 6G +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io writev $(( offset )) 512 1024 64 + TEST_IMG=$TEST_IMG.base io writev $(( offset )) 512 1024 64 # Complete backing clusters - io writev $(( offset + 64 * 1024)) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io writev $(( offset + 64 * 1024)) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img echo "Creating test image with backing file" echo -TEST_IMG=$TEST_IMG_SAVE -_make_test_img -b "$TEST_IMG.base" 6G +TEST_IMG=$TEST_IMG.orig _make_test_img -b "$TEST_IMG.base" 6G echo "Filling test image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io writev $(( offset + 512 )) 512 1024 64
tests/qemu-iotests/018 trap "_cleanup; exit \$status" 0 1 2 3 15 · line 83
Quoted 10 lines
tests/qemu-iotests/018 +3
-3+ TEST_IMG=$TEST_IMG.orig io writev $(( offset + 512 )) 512 1024 64 # Complete test image clusters - io writev $(( offset + 64 * 1024 + 65536)) 65536 65536 1 + TEST_IMG=$TEST_IMG.orig io writev $(( offset + 64 * 1024 + 65536)) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.orig _check_test_img -mv "$TEST_IMG" "$TEST_IMG.orig"
The same pattern. But I'm stopping to duplicate the same comment.
Fam
PATCH v2 7/18 qemu-iotests: fix test 019 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/019 | 30 ++++++++++++++---------------- tests/qemu-iotests/019.out | 4 ++-- 2 files changed, 16 insertions(+), 18 deletions(-)
tests/qemu-iotests/019 +14 -16
@@ -32,9 +32,11 @@ status=1 # failure is the default! _cleanup() { - _cleanup_test_img - rm -f "$TEST_IMG.base" - rm -f "$TEST_IMG.orig" + _cleanup_test_img + if [ "$IMGPROTO" = "file" ]; then + rm -f "$TEST_IMG.base" + rm -f "$TEST_IMG.orig" + fi } trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -45,46 +47,42 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" CLUSTER_SIZE=65536 -_make_test_img 6G +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io_pattern writev $(( offset )) 512 1024 64 42 + TEST_IMG=$TEST_IMG.base io_pattern writev $(( offset )) 512 1024 64 42 # Complete backing clusters - io_pattern writev $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1 42 + TEST_IMG=$TEST_IMG.base io_pattern writev $(( offset + 1024 * 1024)) $CLUSTER_SIZE $CLUSTER_SIZE 1 42 done -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img echo "Creating test image with backing file" echo -mv "$TEST_IMG" "$TEST_IMG.base" -_make_test_img -b "$TEST_IMG.base" 6G +TEST_IMG=$TEST_IMG.orig _make_test_img -b "$TEST_IMG.base" 6G echo "Filling test image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io_pattern writev $(( offset + 512 )) 512 1024 64 43 + TEST_IMG=$TEST_IMG.orig io_pattern writev $(( offset + 512 )) 512 1024 64 43 # Complete test image clusters - io_pattern writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1 43 + TEST_IMG=$TEST_IMG.orig io_pattern writev $(( offset + 1024 * 1024 + $CLUSTER_SIZE)) $CLUSTER_SIZE $CLUSTER_SIZE 1 43 done -_check_test_img - -mv "$TEST_IMG" "$TEST_IMG.orig" - +TEST_IMG=$TEST_IMG.orig _check_test_img # Test the conversion twice: One test with the old-style -B option and another
tests/qemu-iotests/019.out +2 -2
@@ -1,5 +1,5 @@ QA output created by 019 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 Filling base image === IO: pattern 42
@@ -269,7 +269,7 @@ wrote 65536/65536 bytes at offset 4296015872 No errors were found on the image. Creating test image with backing file -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file='TEST_DIR/t.IMGFMT.base' +Formatting 'TEST_DIR/t.IMGFMT.orig', fmt=IMGFMT size=6442450944 backing_file='TEST_DIR/t.IMGFMT.base' Filling test image === IO: pattern 43
Signature · 1 line
1.7.9.5
PATCH v2 8/18 qemu-iotests: fix test 020 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/020 | 24 +++++++++++------------- tests/qemu-iotests/020.out | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-)
tests/qemu-iotests/020 +11 -13
@@ -43,29 +43,28 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux TEST_OFFSETS="0 4294967296" -_make_test_img 6G +TEST_IMG=$TEST_IMG.base _make_test_img 6G echo "Filling base image" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io writev $(( offset )) 512 1024 64 + TEST_IMG=$TEST_IMG.base io writev $(( offset )) 512 1024 64 # Complete backing clusters - io writev $(( offset + 64 * 1024)) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io writev $(( offset + 64 * 1024)) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img echo "Creating test image with backing file" echo -mv "$TEST_IMG" "$TEST_IMG.base" _make_test_img -b "$TEST_IMG.base" 6G echo "Filling test image"
@@ -81,24 +80,23 @@ done _check_test_img $QEMU_IMG commit "$TEST_IMG" -mv "$TEST_IMG.base" "$TEST_IMG" echo "Reading from the backing file" echo for offset in $TEST_OFFSETS; do # Some clusters with alternating backing file/image file reads - io readv $(( offset )) 512 1024 64 - io readv $(( offset + 512 )) 512 1024 64 + TEST_IMG=$TEST_IMG.base io readv $(( offset )) 512 1024 64 + TEST_IMG=$TEST_IMG.base io readv $(( offset + 512 )) 512 1024 64 # Complete test image clusters - io readv $(( offset + 64 * 1024)) 65536 65536 1 - io readv $(( offset + 64 * 1024 + 65536)) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io readv $(( offset + 64 * 1024)) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io readv $(( offset + 64 * 1024 + 65536)) 65536 65536 1 # Empty sectors - io_zero readv $(( offset + 64 * 1024 + 65536 * 4 )) 65536 65536 1 + TEST_IMG=$TEST_IMG.base io_zero readv $(( offset + 64 * 1024 + 65536 * 4 )) 65536 65536 1 done -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img # success, all done echo "*** done"
tests/qemu-iotests/020.out +1 -1
@@ -1,5 +1,5 @@ QA output created by 020 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=6442450944 Filling base image === IO: pattern 0
Signature · 1 line
1.7.9.5
PATCH v2 9/18 qemu-iotests: fix test 024 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/024 | 12 +++++------- tests/qemu-iotests/024.out | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-)
tests/qemu-iotests/024 +5 -7
@@ -43,7 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 and qed support rebasing _supported_fmt qcow2 qed -_supported_proto file +_supported_proto generic _supported_os Linux CLUSTER_SIZE=65536
@@ -60,16 +60,14 @@ CLUSTER_SIZE=65536 echo "Creating backing file" echo -_make_test_img 1G -io_pattern writev 0 $CLUSTER_SIZE $((2 * CLUSTER_SIZE)) 8 0x11 -mv "$TEST_IMG" "$TEST_IMG.base_old" +TEST_IMG=$TEST_IMG.base_old _make_test_img 1G +TEST_IMG=$TEST_IMG.base_old io_pattern writev 0 $CLUSTER_SIZE $((2 * CLUSTER_SIZE)) 8 0x11 echo "Creating new backing file" echo -_make_test_img 1G -io_pattern writev 0 $((2 * CLUSTER_SIZE)) $((4 * CLUSTER_SIZE)) 4 0x22 -mv "$TEST_IMG" "$TEST_IMG.base_new" +TEST_IMG=$TEST_IMG.base_new _make_test_img 1G +TEST_IMG=$TEST_IMG.base_new io_pattern writev 0 $((2 * CLUSTER_SIZE)) $((4 * CLUSTER_SIZE)) 4 0x22 echo "Creating COW image" echo
tests/qemu-iotests/024.out +2 -2
@@ -1,7 +1,7 @@ QA output created by 024 Creating backing file -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 +Formatting 'TEST_DIR/t.IMGFMT.base_old', fmt=IMGFMT size=1073741824 === IO: pattern 0x11 wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
@@ -21,7 +21,7 @@ wrote 65536/65536 bytes at offset 917504 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Creating new backing file -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 +Formatting 'TEST_DIR/t.IMGFMT.base_new', fmt=IMGFMT size=1073741824 === IO: pattern 0x22 wrote 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Signature · 1 line
1.7.9.5
PATCH v2 10/18 qemu-iotests: fix test 028 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/028 | 9 ++++----- tests/qemu-iotests/028.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
tests/qemu-iotests/028 +4 -5
@@ -45,7 +45,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files except vmdk and qcow which do not support # smaller backing files. _supported_fmt qcow2 qed -_supported_proto file +_supported_proto generic _supported_os Linux # Choose a size that is not necessarily a cluster size multiple for image
@@ -58,20 +58,19 @@ base_size=$(( image_size - 1024 * 1024 * 1024 )) offset=$(( base_size - 32 * 1024 )) -_make_test_img $base_size +TEST_IMG=$TEST_IMG.base _make_test_img $base_size echo "Filling base image" echo # Fill end of base image with a pattern, skipping every other sector -io writev $offset 512 1024 32 +TEST_IMG=$TEST_IMG.base io writev $offset 512 1024 32 -_check_test_img +TEST_IMG=$TEST_IMG.base _check_test_img echo "Creating test image with backing file" echo -mv "$TEST_IMG" "$TEST_IMG.base" _make_test_img -b "$TEST_IMG.base" $image_size echo "Filling test image"
tests/qemu-iotests/028.out +1 -1
@@ -1,5 +1,5 @@ QA output created by 028 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=3221227008 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=3221227008 Filling base image === IO: pattern 195
Signature · 1 line
1.7.9.5
PATCH v2 11/18 qemu-iotests: fix test 034 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/034 | 7 +++---- tests/qemu-iotests/034.out | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-)
tests/qemu-iotests/034 +3 -4
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux CLUSTER_SIZE=4k
@@ -48,9 +48,8 @@ size=128M echo echo "== creating backing file for COW tests ==" -_make_test_img $size -$QEMU_IO -c "write -P 0x55 0 1M" "$TEST_IMG" | _filter_qemu_io -mv "$TEST_IMG" "$TEST_IMG.base" +TEST_IMG=$TEST_IMG.base _make_test_img $size +$QEMU_IO -c "write -P 0x55 0 1M" "$TEST_IMG.base" | _filter_qemu_io _make_test_img -b "$TEST_IMG.base" 6G
tests/qemu-iotests/034.out +1 -1
@@ -1,7 +1,7 @@ QA output created by 034 == creating backing file for COW tests == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 1048576/1048576 bytes at offset 0 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file='TEST_DIR/t.IMGFMT.base'
Signature · 1 line
1.7.9.5
PATCH v2 12/18 qemu-iotests: fix test 037 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/037 | 9 +++------ tests/qemu-iotests/037.out | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-)
tests/qemu-iotests/037 +3 -6
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow qcow2 vmdk qed -_supported_proto file +_supported_proto generic _supported_os Linux CLUSTER_SIZE=4k
@@ -48,8 +48,6 @@ size=128M echo echo "== creating backing file for COW tests ==" -_make_test_img $size - function backing_io() { local offset=$1
@@ -66,9 +64,8 @@ function backing_io() done } -backing_io 0 256 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io - -mv "$TEST_IMG" "$TEST_IMG.base" +TEST_IMG=$TEST_IMG.base _make_test_img $size +backing_io 0 256 write | $QEMU_IO "$TEST_IMG.base" | _filter_qemu_io _make_test_img -b "$TEST_IMG.base" 6G
tests/qemu-iotests/037.out +1 -1
@@ -1,7 +1,7 @@ QA output created by 037 == creating backing file for COW tests == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 512/512 bytes at offset 512
Signature · 1 line
1.7.9.5
PATCH v2 13/18 qemu-iotests: fix test 038 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/038 | 9 ++++----- tests/qemu-iotests/038.out | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-)
tests/qemu-iotests/038 +4 -5
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 qed -_supported_proto file +_supported_proto generic _supported_os Linux CLUSTER_SIZE=2M
@@ -48,7 +48,7 @@ size=128M echo echo "== creating backing file for COW tests ==" -_make_test_img $size + function backing_io() {
@@ -66,9 +66,8 @@ function backing_io() done } -backing_io 0 256 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io - -mv "$TEST_IMG" "$TEST_IMG.base" +TEST_IMG=$TEST_IMG.base _make_test_img $size +backing_io 0 256 write | $QEMU_IO "$TEST_IMG.base" | _filter_qemu_io _make_test_img -b "$TEST_IMG.base" 6G
tests/qemu-iotests/038.out +1 -1
@@ -1,7 +1,7 @@ QA output created by 038 == creating backing file for COW tests == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 65536/65536 bytes at offset 65536
Signature · 1 line
1.7.9.5
PATCH v2 14/18 qemu-iotests: fix test 043 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/043 | 24 ++++++++++-------------- tests/qemu-iotests/043.out | 12 ++++++------ 2 files changed, 16 insertions(+), 20 deletions(-)
tests/qemu-iotests/043 +10 -14
@@ -31,7 +31,9 @@ status=1 # failure is the default! _cleanup() { _cleanup_test_img - rm -f "$TEST_IMG".[123].base + if [ $IMGPROTO = "file" ]; then + rm -f "$TEST_IMG".[123].base + fi } trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -41,7 +43,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Any format supporting backing files _supported_fmt qcow2 qed -_supported_proto file +_supported_proto generic _supported_os Linux
@@ -53,8 +55,7 @@ echo echo "== backing file references self ==" _img_info --backing-chain -_make_test_img $size -mv "$TEST_IMG" "$TEST_IMG.base" +TEST_IMG=$TEST_IMG.base _make_test_img $size _make_test_img -b "$TEST_IMG.base" $size $QEMU_IMG rebase -u -b "$TEST_IMG" "$TEST_IMG.base"
@@ -62,12 +63,9 @@ echo echo "== parent references self ==" _img_info --backing-chain -_make_test_img $size -mv "$TEST_IMG" "$TEST_IMG.1.base" -_make_test_img -b "$TEST_IMG.1.base" $size -mv "$TEST_IMG" "$TEST_IMG.2.base" -_make_test_img -b "$TEST_IMG.2.base" $size -mv "$TEST_IMG" "$TEST_IMG.3.base" +TEST_IMG=$TEST_IMG.1.base _make_test_img $size +TEST_IMG=$TEST_IMG.2.base _make_test_img -b "$TEST_IMG.1.base" $size +TEST_IMG=$TEST_IMG.3.base _make_test_img -b "$TEST_IMG.2.base" $size _make_test_img -b "$TEST_IMG.3.base" $size $QEMU_IMG rebase -u -b "$TEST_IMG.2.base" "$TEST_IMG.1.base"
@@ -75,10 +73,8 @@ echo echo "== ancestor references another ancestor ==" _img_info --backing-chain -_make_test_img $size -mv "$TEST_IMG" "$TEST_IMG.1.base" -_make_test_img -b "$TEST_IMG.1.base" $size -mv "$TEST_IMG" "$TEST_IMG.2.base" +TEST_IMG=$TEST_IMG.1.base _make_test_img $size +TEST_IMG=$TEST_IMG.2.base _make_test_img -b "$TEST_IMG.1.base" $size _make_test_img -b "$TEST_IMG.2.base" $size echo
tests/qemu-iotests/043.out +6 -6
@@ -3,20 +3,20 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 == backing file references self == qemu-img: Backing file 'TEST_DIR/t.IMGFMT' creates an infinite loop. -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.base' == parent references self == qemu-img: Backing file 'TEST_DIR/t.IMGFMT' creates an infinite loop. -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.1.base' -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.2.base' +Formatting 'TEST_DIR/t.IMGFMT.1.base', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.2.base', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.1.base' +Formatting 'TEST_DIR/t.IMGFMT.3.base', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.2.base' Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.3.base' == ancestor references another ancestor == qemu-img: Backing file 'TEST_DIR/t.IMGFMT.2.base' creates an infinite loop. -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.1.base' +Formatting 'TEST_DIR/t.IMGFMT.1.base', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.2.base', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.1.base' Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.2.base' == finite chain of length 3 (human) ==
Signature · 1 line
1.7.9.5
PATCH v2 15/18 qemu-iotests: fix test 046 to work with any protocol
In reply to Peter Lieven--- tests/qemu-iotests/046 | 9 +++------ tests/qemu-iotests/046.out | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-)
tests/qemu-iotests/046 +3 -6
@@ -39,7 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 . ./common.filter _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux CLUSTER_SIZE=64k
@@ -48,8 +48,6 @@ size=128M echo echo "== creating backing file for COW tests ==" -_make_test_img $size - function backing_io() { local offset=$1
@@ -66,9 +64,8 @@ function backing_io() done } -backing_io 0 32 write | $QEMU_IO "$TEST_IMG" | _filter_qemu_io - -mv "$TEST_IMG" "$TEST_IMG.base" +TEST_IMG=$TEST_IMG.base _make_test_img $size +backing_io 0 32 write | $QEMU_IO "$TEST_IMG.base" | _filter_qemu_io _make_test_img -b "$TEST_IMG.base" 6G
tests/qemu-iotests/046.out +1 -1
@@ -1,7 +1,7 @@ QA output created by 046 == creating backing file for COW tests == -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 +Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728 wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 65536/65536 bytes at offset 65536
Signature · 1 line
1.7.9.5
PATCH v2 16/18 qemu-iotests: fix expected output of test 067
In reply to Peter Lieven--- tests/qemu-iotests/067.out | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tests/qemu-iotests/067.out +4 -4
@@ -12,7 +12,7 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path": "/machine/peripheral/virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "RESET"} -{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]} +{"return": [{"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
@@ -31,7 +31,7 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path": "/machine/peripheral/virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "RESET"} -{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]} +{"return": [{"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}, {"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
@@ -51,7 +51,7 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path": "/machine/peripheral/virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "RESET"} -{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}]} +{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}]} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
@@ -71,7 +71,7 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"path": "/machine/peripheral/virtio0/virtio-backend"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_DELETED", "data": {"device": "virtio0", "path": "/machine/peripheral/virtio0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "RESET"} -{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "disk", "locked": false, "removable": true, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "tray_open": false, "type": "unknown"}]} +{"return": [{"io-status": "ok", "device": "ide1-cd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "floppy0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"device": "sd0", "locked": false, "removable": true, "tray_open": false, "type": "unknown"}, {"io-status": "ok", "device": "disk", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "image": {"virtual-size": 134217728, "filename": "TEST_DIR/t.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": SIZE, "format-specific": {"type": "qcow2", "data": {"compat": "1.1", "lazy-refcounts": false}}, "dirty-flag": false}, "iops_wr": 0, "ro": false, "backing_file_depth": 0, "drv": "qcow2", "iops": 0, "bps_wr": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "file": "TEST_DIR/t.qcow2", "encryption_key_missing": false}, "type": "unknown"}]} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "DEVICE_TRAY_MOVED", "data": {"device": "ide1-cd0", "tray-open": true}}
Signature · 1 line
1.7.9.5
PATCH v2 17/18 qemu-iotests: blacklist test 020 for NFS protocol
In reply to Peter Lievenreopening is currently not supported.
--- tests/qemu-iotests/020 | 5 +++++ 1 file changed, 5 insertions(+)
tests/qemu-iotests/020 +5 -0
@@ -46,6 +46,11 @@ _supported_fmt qcow qcow2 vmdk qed _supported_proto generic _supported_os Linux +# NFS does not support bdrv_reopen_prepare thus qemu-img commit fails. +if [ "$IMGPROTO" = "nfs" ]; then + _notrun "image protocol $IMGPROTO does not support bdrv_commit" +fi + TEST_OFFSETS="0 4294967296" TEST_IMG=$TEST_IMG.base _make_test_img 6G
Signature · 1 line
1.7.9.5
Re: [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol
Quoted 3 lines · Peter Lieven
reopening is currently not supported.
Signed-off-by Peter Lieven <[email protected]>
For curiosity, is anything specific to nfs stopping the support of reopen? I think commit will work with host NFS mounted images.
Fam
Re: [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol
Quoted 6 lines · Fam Zheng
Quoted 3 lines · Peter Lieven
reopening is currently not supported.
Signed-off-by Peter Lieven <[email protected]>For curiosity, is anything specific to nfs stopping the support of reopen? I think commit will work with host NFS mounted images.
The driver has to implement at least .bdrv_reopen_prepare.
Peter
PATCH v2 18/18 qemu-iotests: test 026 store blkdebug.cfg locally
In reply to Peter Lieven--- tests/qemu-iotests/026 | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
tests/qemu-iotests/026 +13 -7
@@ -28,10 +28,16 @@ here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! +BLKDEBUG_CONFIGDIR=`pwd`/scratch +if [ ! -e "$BLKDEBUG_CONFIGDIR" ]; then + mkdir "BLKDEBUG_CONFIGDIR" +fi +BLKDBG_CONFIGFILE=$BLKDEBUG_CONFIGDIR/blkdebug.conf + _cleanup() { - _cleanup_test_img - rm "$TEST_DIR/blkdebug.conf" + _cleanup_test_img + rm "$BLKDBG_CONFIGFILE" } trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -42,7 +48,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # Currently only qcow2 supports rebasing _supported_fmt qcow2 -_supported_proto file +_supported_proto generic _supported_os Linux _default_cache_mode "writethrough" _supported_cache_modes "writethrough" "none"
@@ -52,7 +58,7 @@ echo CLUSTER_SIZE=1024 -BLKDBG_TEST_IMG="blkdebug:$TEST_DIR/blkdebug.conf:$TEST_IMG" +BLKDBG_TEST_IMG="blkdebug:$BLKDBG_CONFIGFILE:$TEST_IMG" for event in \ l1_update \
@@ -76,7 +82,7 @@ for imm in off; do for once in on off; do for vmstate in "" "-b"; do -cat > "$TEST_DIR/blkdebug.conf" <<EOF +cat > "$BLKDBG_CONFIGFILE" <<EOF [inject-error] event = "$event" errno = "$errno"
@@ -134,7 +140,7 @@ for imm in off; do for once in on off; do for vmstate in "" "-b"; do -cat > "$TEST_DIR/blkdebug.conf" <<EOF +cat > "$BLKDBG_CONFIGFILE" <<EOF [inject-error] event = "$event" errno = "$errno"
@@ -173,7 +179,7 @@ for errno in 5 28; do for imm in off; do for once in on off; do -cat > "$TEST_DIR/blkdebug.conf" <<EOF +cat > "$BLKDBG_CONFIGFILE" <<EOF [inject-error] event = "$event" errno = "$errno"
Signature · 1 line
1.7.9.5
Quoted 30 lines · Peter Lieven
In order to proceed with the integration of the NFS protocol driver into qemu I was asked by Stefan to add integration for NFS into the qemu-iotests.
Unfortunately, this became more complex than I had expected because most of the tests for non RAW formats only work with the file protocol because they use shell commands like cp, rm or mv which obviously don't work on nfs:// URLs.
This series first changes all those tests that are not working out of the box to support only the file protocol.
After the NFS protocol is introduced in Patch 2 I fix most of them to work with any protocol.
After this series the qemu-iotests for NFS run through gracefully with the RAW, QCOW2 and VMDK formats.
There are 3 topics open:
- test 051 fails regardless which protocol is used (I already send a msg to the list)
- test 052 should work, but it seems there is a bug in thebdrv_openlogic if theBDRV_O_SNAPSHOTflag is set and the protocol is anything else than file. Maybe someone with more understanding of the whole open logic could look at this. I do not believe that its sth which has to do with the NFS driver since the test fails while opening the backing file and other backing file tests run without problems.
- other protocols like sheepdog or ssh that are allowed to use other formats than raw should be tested. they actually can't never have run qemu-iotests with qcow2 protocol for instance.
Quoted 3 lines
If you want to do your tests please make sure to have
[PATCHv5] block: add native support for NFS [PATCH v2] vmdk: Allowvmdk_createto work with protocol
Going through my email backlog. What is the status of this series?
Stefan
Am 24.02.2014 13:54, schrieb Stefan Hajnoczi:
Quoted 31 lines · Peter Lieven
Quoted 30 lines
In order to proceed with the integration of the NFS protocol driver into qemu I was asked by Stefan to add integration for NFS into the qemu-iotests.
Unfortunately, this became more complex than I had expected because most of the tests for non RAW formats only work with the file protocol because they use shell commands like cp, rm or mv which obviously don't work on nfs:// URLs.
This series first changes all those tests that are not working out of the box to support only the file protocol.
After the NFS protocol is introduced in Patch 2 I fix most of them to work with any protocol.
After this series the qemu-iotests for NFS run through gracefully with the RAW, QCOW2 and VMDK formats.
There are 3 topics open:
- test 051 fails regardless which protocol is used (I already send a msg to the list)
- test 052 should work, but it seems there is a bug in thebdrv_openlogic if theBDRV_O_SNAPSHOTflag is set and the protocol is anything else than file. Maybe someone with more understanding of the whole open logic could look at this. I do not believe that its sth which has to do with the NFS driver since the test fails while opening the backing file and other backing file tests run without problems.
- other protocols like sheepdog or ssh that are allowed to use other formats than raw should be tested. they actually can't never have run qemu-iotests with qcow2 protocol for instance.
Quoted 4 lines
Quoted 3 lines
If you want to do your tests please make sure to have
[PATCHv5] block: add native support for NFS [PATCH v2] vmdk: Allowvmdk_createto work with protocolGoing through my email backlog. What is the status of this series?
The NFS driver and bare qemu-iotests support is merged. All the patches that try to fix the limit for protocol != file where left out because there was no consensus how the filename construction etc. should be handled.
Peter
Quoted 2 lines
Stefan
Quoted 32 lines · Peter Lieven
Am 24.02.2014 13:54, schrieb Stefan Hajnoczi:
Quoted 31 lines · Peter Lieven
Quoted 30 lines
In order to proceed with the integration of the NFS protocol driver into qemu I was asked by Stefan to add integration for NFS into the qemu-iotests.
Unfortunately, this became more complex than I had expected because most of the tests for non RAW formats only work with the file protocol because they use shell commands like cp, rm or mv which obviously don't work on nfs:// URLs.
This series first changes all those tests that are not working out of the box to support only the file protocol.
After the NFS protocol is introduced in Patch 2 I fix most of them to work with any protocol.
After this series the qemu-iotests for NFS run through gracefully with the RAW, QCOW2 and VMDK formats.
There are 3 topics open:
- test 051 fails regardless which protocol is used (I already send a msg to the list)
- test 052 should work, but it seems there is a bug in thebdrv_openlogic if theBDRV_O_SNAPSHOTflag is set and the protocol is anything else than file. Maybe someone with more understanding of the whole open logic could look at this. I do not believe that its sth which has to do with the NFS driver since the test fails while opening the backing file and other backing file tests run without problems.
- other protocols like sheepdog or ssh that are allowed to use other formats than raw should be tested. they actually can't never have run qemu-iotests with qcow2 protocol for instance.
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
If you want to do your tests please make sure to have
[PATCHv5] block: add native support for NFS [PATCH v2] vmdk: Allowvmdk_createto work with protocolGoing through my email backlog. What is the status of this series?
The NFS driver and bare qemu-iotests support is merged. All the patches that try to fix the limit for protocol != file where left out because there was no consensus how the filename construction etc. should be handled.
Okay, it's the latter I was wondering about. Let's leave it for now.
Stefan