All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol
@ 2014-01-05 17:21 Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 01/18] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
                   ` (18 more replies)
  0 siblings, 19 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

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(-)

-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 01/18] qemu-iotests: change _supported_proto to file for various tests
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol Peter Lieven
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

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.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 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(-)

diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
index 389f4b8..ea3cab9 100755
--- a/tests/qemu-iotests/013
+++ b/tests/qemu-iotests/013
@@ -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"
diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
index 0edeb4b..b23c2db 100755
--- a/tests/qemu-iotests/014
+++ b/tests/qemu-iotests/014
@@ -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"
diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018
index 15fcfe5..aa9d3cb 100755
--- a/tests/qemu-iotests/018
+++ b/tests/qemu-iotests/018
@@ -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"
diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019
index 5bb18d0..d75d125 100755
--- a/tests/qemu-iotests/019
+++ b/tests/qemu-iotests/019
@@ -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"
diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index b3c86d8..a42f32f 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -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"
diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
index 090ed23..9ad06b9 100755
--- a/tests/qemu-iotests/023
+++ b/tests/qemu-iotests/023
@@ -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"
diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index be974f0..9bf99e1 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -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
diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026
index c9c5f83..df2884b 100755
--- a/tests/qemu-iotests/026
+++ b/tests/qemu-iotests/026
@@ -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"
diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index 93a9fa6..a99e4fa 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -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
diff --git a/tests/qemu-iotests/031 b/tests/qemu-iotests/031
index c9070b0..1d920ea 100755
--- a/tests/qemu-iotests/031
+++ b/tests/qemu-iotests/031
@@ -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
diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034
index 67f1959..e911d6f 100755
--- a/tests/qemu-iotests/034
+++ b/tests/qemu-iotests/034
@@ -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
diff --git a/tests/qemu-iotests/036 b/tests/qemu-iotests/036
index e049a64..03b6aa9 100755
--- a/tests/qemu-iotests/036
+++ b/tests/qemu-iotests/036
@@ -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
diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037
index 743bae3..cbe2647 100755
--- a/tests/qemu-iotests/037
+++ b/tests/qemu-iotests/037
@@ -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
diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038
index 7bb7906..cfaf00a 100755
--- a/tests/qemu-iotests/038
+++ b/tests/qemu-iotests/038
@@ -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
diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
index 6abf472..9b355c0 100755
--- a/tests/qemu-iotests/039
+++ b/tests/qemu-iotests/039
@@ -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"
diff --git a/tests/qemu-iotests/043 b/tests/qemu-iotests/043
index d7f1231..b316b97 100755
--- a/tests/qemu-iotests/043
+++ b/tests/qemu-iotests/043
@@ -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
 
 
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index 3f17ceb..2d44bbb 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -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
diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052
index 4d4e411..6bdae92 100755
--- a/tests/qemu-iotests/052
+++ b/tests/qemu-iotests/052
@@ -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"
diff --git a/tests/qemu-iotests/054 b/tests/qemu-iotests/054
index 5a0d1b1..c8b7082 100755
--- a/tests/qemu-iotests/054
+++ b/tests/qemu-iotests/054
@@ -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
diff --git a/tests/qemu-iotests/059 b/tests/qemu-iotests/059
index 73941c3..176c822 100755
--- a/tests/qemu-iotests/059
+++ b/tests/qemu-iotests/059
@@ -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
diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060
index bbb1909..af8ed9f 100755
--- a/tests/qemu-iotests/060
+++ b/tests/qemu-iotests/060
@@ -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)
diff --git a/tests/qemu-iotests/061 b/tests/qemu-iotests/061
index e42f9bd..d3a6b38 100755
--- a/tests/qemu-iotests/061
+++ b/tests/qemu-iotests/061
@@ -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
diff --git a/tests/qemu-iotests/063 b/tests/qemu-iotests/063
index 2ab8f20..ea3e10c 100755
--- a/tests/qemu-iotests/063
+++ b/tests/qemu-iotests/063
@@ -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
diff --git a/tests/qemu-iotests/069 b/tests/qemu-iotests/069
index 3042803..9c1f497 100755
--- a/tests/qemu-iotests/069
+++ b/tests/qemu-iotests/069
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 01/18] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-06 20:14   ` Jeff Cody
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 03/18] qemu-iotests: enable test 016 and 025 to work with " Peter Lieven
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/common    |   22 +++++++++++++++++++---
 tests/qemu-iotests/common.rc |    3 +++
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index 8b4e22c..e19673b 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -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
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 28ba0d9..940b863 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 03/18] qemu-iotests: enable test 016 and 025 to work with NFS protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 01/18] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol Peter Lieven
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/016 |    2 +-
 tests/qemu-iotests/025 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/016 b/tests/qemu-iotests/016
index b87a32b..7ea9e94 100755
--- a/tests/qemu-iotests/016
+++ b/tests/qemu-iotests/016
@@ -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
 
 
diff --git a/tests/qemu-iotests/025 b/tests/qemu-iotests/025
index 9426c93..a5f45b4 100755
--- a/tests/qemu-iotests/025
+++ b/tests/qemu-iotests/025
@@ -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"
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (2 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 03/18] qemu-iotests: enable test 016 and 025 to work with " Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-06  5:31   ` Fam Zheng
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 " Peter Lieven
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/013     |    9 ++++-----
 tests/qemu-iotests/013.out |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
index ea3cab9..0dbc934 100755
--- a/tests/qemu-iotests/013
+++ b/tests/qemu-iotests/013
@@ -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"
diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
index 43a414c..763cb0c 100644
--- a/tests/qemu-iotests/013.out
+++ b/tests/qemu-iotests/013.out
@@ -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:
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (3 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-06  5:40   ` Fam Zheng
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 " Peter Lieven
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 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(-)

diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
index b23c2db..01fb614 100755
--- a/tests/qemu-iotests/014
+++ b/tests/qemu-iotests/014
@@ -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
diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
index 4744b4b..6459af0 100644
--- a/tests/qemu-iotests/014.out
+++ b/tests/qemu-iotests/014.out
@@ -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]
diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
index 9ad06b9..2357696 100755
--- a/tests/qemu-iotests/023
+++ b/tests/qemu-iotests/023
@@ -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
diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
index ec32341..b80836d 100644
--- a/tests/qemu-iotests/023.out
+++ b/tests/qemu-iotests/023.out
@@ -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
diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
index ddfbca1..d6ed5c1 100644
--- a/tests/qemu-iotests/common.pattern
+++ b/tests/qemu-iotests/common.pattern
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (4 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 " Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-06  5:45   ` Fam Zheng
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 " Peter Lieven
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/018     |   22 +++++++++-------------
 tests/qemu-iotests/018.out |    4 ++--
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018
index aa9d3cb..fecf281 100755
--- a/tests/qemu-iotests/018
+++ b/tests/qemu-iotests/018
@@ -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"
diff --git a/tests/qemu-iotests/018.out b/tests/qemu-iotests/018.out
index 25e7b95..ea05253 100644
--- a/tests/qemu-iotests/018.out
+++ b/tests/qemu-iotests/018.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (5 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 " Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 08/18] qemu-iotests: fix test 020 " Peter Lieven
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/019     |   30 ++++++++++++++----------------
 tests/qemu-iotests/019.out |    4 ++--
 2 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/tests/qemu-iotests/019 b/tests/qemu-iotests/019
index d75d125..5638611 100755
--- a/tests/qemu-iotests/019
+++ b/tests/qemu-iotests/019
@@ -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
diff --git a/tests/qemu-iotests/019.out b/tests/qemu-iotests/019.out
index f0c6e63..f2c3da3 100644
--- a/tests/qemu-iotests/019.out
+++ b/tests/qemu-iotests/019.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 08/18] qemu-iotests: fix test 020 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (6 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 " Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 09/18] qemu-iotests: fix test 024 " Peter Lieven
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/020     |   24 +++++++++++-------------
 tests/qemu-iotests/020.out |    2 +-
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index a42f32f..55358ac 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -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"
diff --git a/tests/qemu-iotests/020.out b/tests/qemu-iotests/020.out
index fc9a63c..90a6271 100644
--- a/tests/qemu-iotests/020.out
+++ b/tests/qemu-iotests/020.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 09/18] qemu-iotests: fix test 024 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (7 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 08/18] qemu-iotests: fix test 020 " Peter Lieven
@ 2014-01-05 17:21 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 10/18] qemu-iotests: fix test 028 " Peter Lieven
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/024     |   12 +++++-------
 tests/qemu-iotests/024.out |    4 ++--
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/tests/qemu-iotests/024 b/tests/qemu-iotests/024
index 9bf99e1..1db42df 100755
--- a/tests/qemu-iotests/024
+++ b/tests/qemu-iotests/024
@@ -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
diff --git a/tests/qemu-iotests/024.out b/tests/qemu-iotests/024.out
index e84b973..a52b5a0 100644
--- a/tests/qemu-iotests/024.out
+++ b/tests/qemu-iotests/024.out
@@ -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)
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 10/18] qemu-iotests: fix test 028 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (8 preceding siblings ...)
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 09/18] qemu-iotests: fix test 024 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 11/18] qemu-iotests: fix test 034 " Peter Lieven
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/028     |    9 ++++-----
 tests/qemu-iotests/028.out |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/028 b/tests/qemu-iotests/028
index a99e4fa..4c7644d 100755
--- a/tests/qemu-iotests/028
+++ b/tests/qemu-iotests/028
@@ -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"
diff --git a/tests/qemu-iotests/028.out b/tests/qemu-iotests/028.out
index 8affb7f..444e89a 100644
--- a/tests/qemu-iotests/028.out
+++ b/tests/qemu-iotests/028.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 11/18] qemu-iotests: fix test 034 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (9 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 10/18] qemu-iotests: fix test 028 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 12/18] qemu-iotests: fix test 037 " Peter Lieven
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/034     |    7 +++----
 tests/qemu-iotests/034.out |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/qemu-iotests/034 b/tests/qemu-iotests/034
index e911d6f..0f95379 100755
--- a/tests/qemu-iotests/034
+++ b/tests/qemu-iotests/034
@@ -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
 
diff --git a/tests/qemu-iotests/034.out b/tests/qemu-iotests/034.out
index e82dae5..8913644 100644
--- a/tests/qemu-iotests/034.out
+++ b/tests/qemu-iotests/034.out
@@ -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' 
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 12/18] qemu-iotests: fix test 037 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (10 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 11/18] qemu-iotests: fix test 034 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 13/18] qemu-iotests: fix test 038 " Peter Lieven
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/037     |    9 +++------
 tests/qemu-iotests/037.out |    2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/037 b/tests/qemu-iotests/037
index cbe2647..d7c9cee 100755
--- a/tests/qemu-iotests/037
+++ b/tests/qemu-iotests/037
@@ -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
 
diff --git a/tests/qemu-iotests/037.out b/tests/qemu-iotests/037.out
index 4eb84ed..8785508 100644
--- a/tests/qemu-iotests/037.out
+++ b/tests/qemu-iotests/037.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 13/18] qemu-iotests: fix test 038 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (11 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 12/18] qemu-iotests: fix test 037 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 14/18] qemu-iotests: fix test 043 " Peter Lieven
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/038     |    9 ++++-----
 tests/qemu-iotests/038.out |    2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/qemu-iotests/038 b/tests/qemu-iotests/038
index cfaf00a..2b8318f 100755
--- a/tests/qemu-iotests/038
+++ b/tests/qemu-iotests/038
@@ -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
 
diff --git a/tests/qemu-iotests/038.out b/tests/qemu-iotests/038.out
index a71c3fa..45f240a 100644
--- a/tests/qemu-iotests/038.out
+++ b/tests/qemu-iotests/038.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 14/18] qemu-iotests: fix test 043 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (12 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 13/18] qemu-iotests: fix test 038 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 15/18] qemu-iotests: fix test 046 " Peter Lieven
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/043     |   24 ++++++++++--------------
 tests/qemu-iotests/043.out |   12 ++++++------
 2 files changed, 16 insertions(+), 20 deletions(-)

diff --git a/tests/qemu-iotests/043 b/tests/qemu-iotests/043
index b316b97..4c9e930 100755
--- a/tests/qemu-iotests/043
+++ b/tests/qemu-iotests/043
@@ -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
diff --git a/tests/qemu-iotests/043.out b/tests/qemu-iotests/043.out
index ad23337..3a7cef8 100644
--- a/tests/qemu-iotests/043.out
+++ b/tests/qemu-iotests/043.out
@@ -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) ==
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 15/18] qemu-iotests: fix test 046 to work with any protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (13 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 14/18] qemu-iotests: fix test 043 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 16/18] qemu-iotests: fix expected output of test 067 Peter Lieven
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/046     |    9 +++------
 tests/qemu-iotests/046.out |    2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index 2d44bbb..2a69a11 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -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
 
diff --git a/tests/qemu-iotests/046.out b/tests/qemu-iotests/046.out
index 65d584b..d1d49d8 100644
--- a/tests/qemu-iotests/046.out
+++ b/tests/qemu-iotests/046.out
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 16/18] qemu-iotests: fix expected output of test 067
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (14 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 15/18] qemu-iotests: fix test 046 " Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol Peter Lieven
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/067.out |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out
index 8d271cc..79ed90f 100644
--- a/tests/qemu-iotests/067.out
+++ b/tests/qemu-iotests/067.out
@@ -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}}
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (15 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 16/18] qemu-iotests: fix expected output of test 067 Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-01-06  5:51   ` Fam Zheng
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 18/18] qemu-iotests: test 026 store blkdebug.cfg locally Peter Lieven
  2014-02-24 12:54 ` [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Stefan Hajnoczi
  18 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

reopening is currently not supported.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/020 |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qemu-iotests/020 b/tests/qemu-iotests/020
index 55358ac..2144463 100755
--- a/tests/qemu-iotests/020
+++ b/tests/qemu-iotests/020
@@ -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
-- 
1.7.9.5

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

* [Qemu-devel] [PATCHv2 18/18] qemu-iotests: test 026 store blkdebug.cfg locally
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (16 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol Peter Lieven
@ 2014-01-05 17:22 ` Peter Lieven
  2014-02-24 12:54 ` [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Stefan Hajnoczi
  18 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-05 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, Jeff Cody, Peter Lieven,
	Max Reitz, owasserm, Federico Simoncelli, Stefan Hajnoczi,
	Wenchao Xia

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 tests/qemu-iotests/026 |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/tests/qemu-iotests/026 b/tests/qemu-iotests/026
index df2884b..fe268e4 100755
--- a/tests/qemu-iotests/026
+++ b/tests/qemu-iotests/026
@@ -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"
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol Peter Lieven
@ 2014-01-06  5:31   ` Fam Zheng
  2014-01-06  6:48     ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Fam Zheng @ 2014-01-06  5:31 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 01:21, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>   tests/qemu-iotests/013     |    9 ++++-----
>   tests/qemu-iotests/013.out |    2 +-
>   2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
> index ea3cab9..0dbc934 100755
> --- a/tests/qemu-iotests/013
> +++ b/tests/qemu-iotests/013
> @@ -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
>

I think dropping these three TEST_IMG overriding change...

> -_make_test_img 6G
> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G

#1

>
>   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

#2

>       done
> -    _check_test_img
> +    TEST_IMG=$TEST_IMG.orig _check_test_img

#3

>   done
>
>
>   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.

>   $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
>
>   echo "Testing compressed image"
> diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
> index 43a414c..763cb0c 100644
> --- a/tests/qemu-iotests/013.out
> +++ b/tests/qemu-iotests/013.out
> @@ -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

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 " Peter Lieven
@ 2014-01-06  5:40   ` Fam Zheng
  2014-01-06  6:49     ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Fam Zheng @ 2014-01-06  5:40 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 01:21, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>   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(-)
>
> diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
> index b23c2db..01fb614 100755
> --- a/tests/qemu-iotests/014
> +++ b/tests/qemu-iotests/014
> @@ -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
> diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
> index 4744b4b..6459af0 100644
> --- a/tests/qemu-iotests/014.out
> +++ b/tests/qemu-iotests/014.out
> @@ -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]
> diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
> index 9ad06b9..2357696 100755
> --- a/tests/qemu-iotests/023
> +++ b/tests/qemu-iotests/023
> @@ -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
> diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
> index ec32341..b80836d 100644
> --- a/tests/qemu-iotests/023.out
> +++ b/tests/qemu-iotests/023.out
> @@ -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
>

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.

>   test2: With offset 0
> diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
> index ddfbca1..d6ed5c1 100644
> --- a/tests/qemu-iotests/common.pattern
> +++ b/tests/qemu-iotests/common.pattern
> @@ -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
>

Especially here, overriding TEST_IMG inside a utility function is not right.

Fam

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

* Re: [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 to work with any protocol
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 " Peter Lieven
@ 2014-01-06  5:45   ` Fam Zheng
  0 siblings, 0 replies; 40+ messages in thread
From: Fam Zheng @ 2014-01-06  5:45 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 01:21, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>   tests/qemu-iotests/018     |   22 +++++++++-------------
>   tests/qemu-iotests/018.out |    4 ++--
>   2 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/tests/qemu-iotests/018 b/tests/qemu-iotests/018
> index aa9d3cb..fecf281 100755
> --- a/tests/qemu-iotests/018
> +++ b/tests/qemu-iotests/018
> @@ -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"

The same pattern. But I'm stopping to duplicate the same comment.

Fam

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

* Re: [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol Peter Lieven
@ 2014-01-06  5:51   ` Fam Zheng
  2014-01-06  6:41     ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Fam Zheng @ 2014-01-06  5:51 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 01:22, Peter Lieven wrote:
> reopening is currently not supported.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>

For curiosity, is anything specific to nfs stopping the support of 
reopen? I think commit will work with host NFS mounted images.

Fam

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

* Re: [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol
  2014-01-06  5:51   ` Fam Zheng
@ 2014-01-06  6:41     ` Peter Lieven
  0 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-06  6:41 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 06.01.2014 06:51, Fam Zheng wrote:
> On 2014年01月06日 01:22, Peter Lieven wrote:
>> reopening is currently not supported.
>>
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>
> 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

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06  5:31   ` Fam Zheng
@ 2014-01-06  6:48     ` Peter Lieven
  2014-01-06 10:09       ` Fam Zheng
  2014-01-06 20:40       ` Jeff Cody
  0 siblings, 2 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-06  6:48 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 06.01.2014 06:31, Fam Zheng wrote:
> On 2014年01月06日 01:21, Peter Lieven wrote:
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>>   tests/qemu-iotests/013     |    9 ++++-----
>>   tests/qemu-iotests/013.out |    2 +-
>>   2 files changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
>> index ea3cab9..0dbc934 100755
>> --- a/tests/qemu-iotests/013
>> +++ b/tests/qemu-iotests/013
>> @@ -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
>>
>
> I think dropping these three TEST_IMG overriding change...
>
>> -_make_test_img 6G
>> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
>
> #1
>
>>
>>   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
>
> #2
>
>>       done
>> -    _check_test_img
>> +    TEST_IMG=$TEST_IMG.orig _check_test_img
>
> #3
>
>>   done
>>
>>
>>   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.
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.
>
>>   $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
>>
>>   echo "Testing compressed image"
>> diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
>> index 43a414c..763cb0c 100644
>> --- a/tests/qemu-iotests/013.out
>> +++ b/tests/qemu-iotests/013.out
>> @@ -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
Peter

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-06  5:40   ` Fam Zheng
@ 2014-01-06  6:49     ` Peter Lieven
  2014-01-10 19:04       ` Kevin Wolf
  0 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-06  6:49 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 06.01.2014 06:40, Fam Zheng wrote:
> On 2014年01月06日 01:21, Peter Lieven wrote:
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>>   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(-)
>>
>> diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
>> index b23c2db..01fb614 100755
>> --- a/tests/qemu-iotests/014
>> +++ b/tests/qemu-iotests/014
>> @@ -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
>> diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
>> index 4744b4b..6459af0 100644
>> --- a/tests/qemu-iotests/014.out
>> +++ b/tests/qemu-iotests/014.out
>> @@ -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]
>> diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
>> index 9ad06b9..2357696 100755
>> --- a/tests/qemu-iotests/023
>> +++ b/tests/qemu-iotests/023
>> @@ -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
>> diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
>> index ec32341..b80836d 100644
>> --- a/tests/qemu-iotests/023.out
>> +++ b/tests/qemu-iotests/023.out
>> @@ -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
>>
>
> 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.
>
>>   test2: With offset 0
>> diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
>> index ddfbca1..d6ed5c1 100644
>> --- a/tests/qemu-iotests/common.pattern
>> +++ b/tests/qemu-iotests/common.pattern
>> @@ -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
>>
>
> Especially here, overriding TEST_IMG inside 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

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06  6:48     ` Peter Lieven
@ 2014-01-06 10:09       ` Fam Zheng
  2014-01-06 12:21         ` Peter Lieven
  2014-01-06 20:40       ` Jeff Cody
  1 sibling, 1 reply; 40+ messages in thread
From: Fam Zheng @ 2014-01-06 10:09 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 14:48, Peter Lieven wrote:
> On 06.01.2014 06:31, Fam Zheng wrote:
>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>> ---
>>>   tests/qemu-iotests/013     |    9 ++++-----
>>>   tests/qemu-iotests/013.out |    2 +-
>>>   2 files changed, 5 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
>>> index ea3cab9..0dbc934 100755
>>> --- a/tests/qemu-iotests/013
>>> +++ b/tests/qemu-iotests/013
>>> @@ -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
>>>
>>
>> I think dropping these three TEST_IMG overriding change...
>>
>>> -_make_test_img 6G
>>> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
>>
>> #1
>>
>>>
>>>   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
>>
>> #2
>>
>>>       done
>>> -    _check_test_img
>>> +    TEST_IMG=$TEST_IMG.orig _check_test_img
>>
>> #3
>>
>>>   done
>>>
>>>
>>>   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.
> 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.
>

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.

> 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.

I'll leave maintainers to decide.

Fam

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06 10:09       ` Fam Zheng
@ 2014-01-06 12:21         ` Peter Lieven
  2014-01-06 12:47           ` Fam Zheng
  0 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-06 12:21 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 06.01.2014 11:09, Fam Zheng wrote:
> On 2014年01月06日 14:48, Peter Lieven wrote:
>> On 06.01.2014 06:31, Fam Zheng wrote:
>>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>>> ---
>>>>   tests/qemu-iotests/013     |    9 ++++-----
>>>>   tests/qemu-iotests/013.out |    2 +-
>>>>   2 files changed, 5 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
>>>> index ea3cab9..0dbc934 100755
>>>> --- a/tests/qemu-iotests/013
>>>> +++ b/tests/qemu-iotests/013
>>>> @@ -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
>>>>
>>>
>>> I think dropping these three TEST_IMG overriding change...
>>>
>>>> -_make_test_img 6G
>>>> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
>>>
>>> #1
>>>
>>>>
>>>>   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
>>>
>>> #2
>>>
>>>>       done
>>>> -    _check_test_img
>>>> +    TEST_IMG=$TEST_IMG.orig _check_test_img
>>>
>>> #3
>>>
>>>>   done
>>>>
>>>>
>>>>   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.
>> 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.
>>
>
> 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.

>
> 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.
>
>> 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.
>
> 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

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06 12:21         ` Peter Lieven
@ 2014-01-06 12:47           ` Fam Zheng
  0 siblings, 0 replies; 40+ messages in thread
From: Fam Zheng @ 2014-01-06 12:47 UTC (permalink / raw)
  To: Peter Lieven, qemu-devel
  Cc: Kevin Wolf, ronniesahlberg, Jeff Cody, Max Reitz, owasserm,
	Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On 2014年01月06日 20:21, Peter Lieven wrote:
> On 06.01.2014 11:09, Fam Zheng wrote:
>> On 2014年01月06日 14:48, Peter Lieven wrote:
>>> On 06.01.2014 06:31, Fam Zheng wrote:
>>>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>>>> ---
>>>>>   tests/qemu-iotests/013     |    9 ++++-----
>>>>>   tests/qemu-iotests/013.out |    2 +-
>>>>>   2 files changed, 5 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
>>>>> index ea3cab9..0dbc934 100755
>>>>> --- a/tests/qemu-iotests/013
>>>>> +++ b/tests/qemu-iotests/013
>>>>> @@ -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
>>>>>
>>>>
>>>> I think dropping these three TEST_IMG overriding change...
>>>>
>>>>> -_make_test_img 6G
>>>>> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
>>>>
>>>> #1
>>>>
>>>>>
>>>>>   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
>>>>
>>>> #2
>>>>
>>>>>       done
>>>>> -    _check_test_img
>>>>> +    TEST_IMG=$TEST_IMG.orig _check_test_img
>>>>
>>>> #3
>>>>
>>>>>   done
>>>>>
>>>>>
>>>>>   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.
>>> 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.
>>>
>>
>> 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.
>
>>
>> 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.

OK, thanks for clarification.

Fam

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

* Re: [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol
  2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol Peter Lieven
@ 2014-01-06 20:14   ` Jeff Cody
  2014-01-06 22:19     ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Jeff Cody @ 2014-01-06 20:14 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On Sun, Jan 05, 2014 at 06:21:52PM +0100, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  tests/qemu-iotests/common    |   22 +++++++++++++++++++---
>  tests/qemu-iotests/common.rc |    3 +++
>  2 files changed, 22 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
> index 8b4e22c..e19673b 100644
> --- a/tests/qemu-iotests/common
> +++ b/tests/qemu-iotests/common
> @@ -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

This should be IMGPROTO, right?

> +            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
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 28ba0d9..940b863 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -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
> -- 
> 1.7.9.5
> 

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06  6:48     ` Peter Lieven
  2014-01-06 10:09       ` Fam Zheng
@ 2014-01-06 20:40       ` Jeff Cody
  2014-01-06 22:35         ` Peter Lieven
  1 sibling, 1 reply; 40+ messages in thread
From: Jeff Cody @ 2014-01-06 20:40 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

On Mon, Jan 06, 2014 at 07:48:25AM +0100, Peter Lieven wrote:
> On 06.01.2014 06:31, Fam Zheng wrote:
> >On 2014年01月06日 01:21, Peter Lieven wrote:
> >>Signed-off-by: Peter Lieven <pl@kamp.de>
> >>---
> >>  tests/qemu-iotests/013     |    9 ++++-----
> >>  tests/qemu-iotests/013.out |    2 +-
> >>  2 files changed, 5 insertions(+), 6 deletions(-)
> >>
> >>diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
> >>index ea3cab9..0dbc934 100755
> >>--- a/tests/qemu-iotests/013
> >>+++ b/tests/qemu-iotests/013
> >>@@ -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
> >>
> >
> >I think dropping these three TEST_IMG overriding change...
> >
> >>-_make_test_img 6G
> >>+TEST_IMG=$TEST_IMG.orig _make_test_img 6G
> >
> >#1
> >
> >>
> >>  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
> >
> >#2
> >
> >>      done
> >>-    _check_test_img
> >>+    TEST_IMG=$TEST_IMG.orig _check_test_img
> >
> >#3
> >
> >>  done
> >>
> >>
> >>  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.
> 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.

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.

> 
> 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.
> >
> >>  $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
> >>
> >>  echo "Testing compressed image"
> >>diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
> >>index 43a414c..763cb0c 100644
> >>--- a/tests/qemu-iotests/013.out
> >>+++ b/tests/qemu-iotests/013.out
> >>@@ -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
> Peter

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

* Re: [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol
  2014-01-06 20:14   ` Jeff Cody
@ 2014-01-06 22:19     ` Peter Lieven
  0 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-06 22:19 UTC (permalink / raw)
  To: Jeff Cody
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia



> Am 06.01.2014 um 21:14 schrieb Jeff Cody <jcody@redhat.com>:
> 
>> On Sun, Jan 05, 2014 at 06:21:52PM +0100, Peter Lieven wrote:
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>> tests/qemu-iotests/common    |   22 +++++++++++++++++++---
>> tests/qemu-iotests/common.rc |    3 +++
>> 2 files changed, 22 insertions(+), 3 deletions(-)
>> 
>> diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
>> index 8b4e22c..e19673b 100644
>> --- a/tests/qemu-iotests/common
>> +++ b/tests/qemu-iotests/common
>> @@ -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
> 
> This 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

> 
>> +            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
>> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
>> index 28ba0d9..940b863 100644
>> --- a/tests/qemu-iotests/common.rc
>> +++ b/tests/qemu-iotests/common.rc
>> @@ -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
>> -- 
>> 1.7.9.5
>> 

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

* Re: [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol
  2014-01-06 20:40       ` Jeff Cody
@ 2014-01-06 22:35         ` Peter Lieven
  0 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-06 22:35 UTC (permalink / raw)
  To: Jeff Cody
  Cc: Kevin Wolf, Fam Zheng, ronniesahlberg, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia



> Am 06.01.2014 um 21:40 schrieb Jeff Cody <jcody@redhat.com>:
> 
>> On Mon, Jan 06, 2014 at 07:48:25AM +0100, Peter Lieven wrote:
>>> On 06.01.2014 06:31, Fam Zheng wrote:
>>>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>>> ---
>>>> tests/qemu-iotests/013     |    9 ++++-----
>>>> tests/qemu-iotests/013.out |    2 +-
>>>> 2 files changed, 5 insertions(+), 6 deletions(-)
>>>> 
>>>> diff --git a/tests/qemu-iotests/013 b/tests/qemu-iotests/013
>>>> index ea3cab9..0dbc934 100755
>>>> --- a/tests/qemu-iotests/013
>>>> +++ b/tests/qemu-iotests/013
>>>> @@ -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
>>> 
>>> I think dropping these three TEST_IMG overriding change...
>>> 
>>>> -_make_test_img 6G
>>>> +TEST_IMG=$TEST_IMG.orig _make_test_img 6G
>>> 
>>> #1
>>> 
>>>> 
>>>> 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
>>> 
>>> #2
>>> 
>>>>     done
>>>> -    _check_test_img
>>>> +    TEST_IMG=$TEST_IMG.orig _check_test_img
>>> 
>>> #3
>>> 
>>>> done
>>>> 
>>>> 
>>>> 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.
>> 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.
> 
> 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.

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...

> 
>> 
>> 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.
>>> 
>>>> $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG"
>>>> 
>>>> echo "Testing compressed image"
>>>> diff --git a/tests/qemu-iotests/013.out b/tests/qemu-iotests/013.out
>>>> index 43a414c..763cb0c 100644
>>>> --- a/tests/qemu-iotests/013.out
>>>> +++ b/tests/qemu-iotests/013.out
>>>> @@ -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
>> Peter

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-06  6:49     ` Peter Lieven
@ 2014-01-10 19:04       ` Kevin Wolf
  2014-01-10 19:06         ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Kevin Wolf @ 2014-01-10 19:04 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Fam Zheng, ronniesahlberg, Jeff Cody, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
> On 06.01.2014 06:40, Fam Zheng wrote:
> >On 2014年01月06日 01:21, Peter Lieven wrote:
> >>Signed-off-by: Peter Lieven <pl@kamp.de>
> >>---
> >>  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(-)
> >>
> >>diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
> >>index b23c2db..01fb614 100755
> >>--- a/tests/qemu-iotests/014
> >>+++ b/tests/qemu-iotests/014
> >>@@ -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
> >>diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
> >>index 4744b4b..6459af0 100644
> >>--- a/tests/qemu-iotests/014.out
> >>+++ b/tests/qemu-iotests/014.out
> >>@@ -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]
> >>diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
> >>index 9ad06b9..2357696 100755
> >>--- a/tests/qemu-iotests/023
> >>+++ b/tests/qemu-iotests/023
> >>@@ -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
> >>diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
> >>index ec32341..b80836d 100644
> >>--- a/tests/qemu-iotests/023.out
> >>+++ b/tests/qemu-iotests/023.out
> >>@@ -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
> >>
> >
> >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.
> >
> >>  test2: With offset 0
> >>diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
> >>index ddfbca1..d6ed5c1 100644
> >>--- a/tests/qemu-iotests/common.pattern
> >>+++ b/tests/qemu-iotests/common.pattern
> >>@@ -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
> >>
> >
> >Especially here, overriding TEST_IMG inside 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.

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

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-10 19:04       ` Kevin Wolf
@ 2014-01-10 19:06         ` Peter Lieven
  2014-01-10 19:14           ` Kevin Wolf
  0 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-01-10 19:06 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: Fam Zheng, ronniesahlberg, Jeff Cody, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

Am 10.01.2014 20:04, schrieb Kevin Wolf:
> Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
>> On 06.01.2014 06:40, Fam Zheng wrote:
>>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>>> ---
>>>>  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(-)
>>>>
>>>> diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
>>>> index b23c2db..01fb614 100755
>>>> --- a/tests/qemu-iotests/014
>>>> +++ b/tests/qemu-iotests/014
>>>> @@ -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
>>>> diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
>>>> index 4744b4b..6459af0 100644
>>>> --- a/tests/qemu-iotests/014.out
>>>> +++ b/tests/qemu-iotests/014.out
>>>> @@ -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]
>>>> diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
>>>> index 9ad06b9..2357696 100755
>>>> --- a/tests/qemu-iotests/023
>>>> +++ b/tests/qemu-iotests/023
>>>> @@ -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
>>>> diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
>>>> index ec32341..b80836d 100644
>>>> --- a/tests/qemu-iotests/023.out
>>>> +++ b/tests/qemu-iotests/023.out
>>>> @@ -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
>>>>
>>> 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.
>>>
>>>>  test2: With offset 0
>>>> diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
>>>> index ddfbca1..d6ed5c1 100644
>>>> --- a/tests/qemu-iotests/common.pattern
>>>> +++ b/tests/qemu-iotests/common.pattern
>>>> @@ -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
>>>>
>>> Especially here, overriding TEST_IMG inside 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.
> 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.
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

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-10 19:06         ` Peter Lieven
@ 2014-01-10 19:14           ` Kevin Wolf
  2014-01-10 19:36             ` Peter Lieven
  0 siblings, 1 reply; 40+ messages in thread
From: Kevin Wolf @ 2014-01-10 19:14 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Fam Zheng, ronniesahlberg, Jeff Cody, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

Am 10.01.2014 um 20:06 hat Peter Lieven geschrieben:
> Am 10.01.2014 20:04, schrieb Kevin Wolf:
> > Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
> >> On 06.01.2014 06:40, Fam Zheng wrote:
> >>> On 2014年01月06日 01:21, Peter Lieven wrote:
> >>>> Signed-off-by: Peter Lieven <pl@kamp.de>
> >>>> ---
> >>>>  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(-)
> >>>>
> >>>> diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
> >>>> index b23c2db..01fb614 100755
> >>>> --- a/tests/qemu-iotests/014
> >>>> +++ b/tests/qemu-iotests/014
> >>>> @@ -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
> >>>> diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
> >>>> index 4744b4b..6459af0 100644
> >>>> --- a/tests/qemu-iotests/014.out
> >>>> +++ b/tests/qemu-iotests/014.out
> >>>> @@ -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]
> >>>> diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
> >>>> index 9ad06b9..2357696 100755
> >>>> --- a/tests/qemu-iotests/023
> >>>> +++ b/tests/qemu-iotests/023
> >>>> @@ -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
> >>>> diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
> >>>> index ec32341..b80836d 100644
> >>>> --- a/tests/qemu-iotests/023.out
> >>>> +++ b/tests/qemu-iotests/023.out
> >>>> @@ -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
> >>>>
> >>> 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.
> >>>
> >>>>  test2: With offset 0
> >>>> diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
> >>>> index ddfbca1..d6ed5c1 100644
> >>>> --- a/tests/qemu-iotests/common.pattern
> >>>> +++ b/tests/qemu-iotests/common.pattern
> >>>> @@ -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
> >>>>
> >>> Especially here, overriding TEST_IMG inside 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.
> > 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.
> 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?

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

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

* Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
  2014-01-10 19:14           ` Kevin Wolf
@ 2014-01-10 19:36             ` Peter Lieven
  0 siblings, 0 replies; 40+ messages in thread
From: Peter Lieven @ 2014-01-10 19:36 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: Fam Zheng, ronniesahlberg, Jeff Cody, qemu-devel, Max Reitz,
	owasserm, Federico Simoncelli, Stefan Hajnoczi, Wenchao Xia

Am 10.01.2014 20:14, schrieb Kevin Wolf:
> Am 10.01.2014 um 20:06 hat Peter Lieven geschrieben:
>> Am 10.01.2014 20:04, schrieb Kevin Wolf:
>>> Am 06.01.2014 um 07:49 hat Peter Lieven geschrieben:
>>>> On 06.01.2014 06:40, Fam Zheng wrote:
>>>>> On 2014年01月06日 01:21, Peter Lieven wrote:
>>>>>> Signed-off-by: Peter Lieven <pl@kamp.de>
>>>>>> ---
>>>>>>  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(-)
>>>>>>
>>>>>> diff --git a/tests/qemu-iotests/014 b/tests/qemu-iotests/014
>>>>>> index b23c2db..01fb614 100755
>>>>>> --- a/tests/qemu-iotests/014
>>>>>> +++ b/tests/qemu-iotests/014
>>>>>> @@ -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
>>>>>> diff --git a/tests/qemu-iotests/014.out b/tests/qemu-iotests/014.out
>>>>>> index 4744b4b..6459af0 100644
>>>>>> --- a/tests/qemu-iotests/014.out
>>>>>> +++ b/tests/qemu-iotests/014.out
>>>>>> @@ -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]
>>>>>> diff --git a/tests/qemu-iotests/023 b/tests/qemu-iotests/023
>>>>>> index 9ad06b9..2357696 100755
>>>>>> --- a/tests/qemu-iotests/023
>>>>>> +++ b/tests/qemu-iotests/023
>>>>>> @@ -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
>>>>>> diff --git a/tests/qemu-iotests/023.out b/tests/qemu-iotests/023.out
>>>>>> index ec32341..b80836d 100644
>>>>>> --- a/tests/qemu-iotests/023.out
>>>>>> +++ b/tests/qemu-iotests/023.out
>>>>>> @@ -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
>>>>>>
>>>>> 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.
>>>>>
>>>>>>  test2: With offset 0
>>>>>> diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern
>>>>>> index ddfbca1..d6ed5c1 100644
>>>>>> --- a/tests/qemu-iotests/common.pattern
>>>>>> +++ b/tests/qemu-iotests/common.pattern
>>>>>> @@ -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
>>>>>>
>>>>> Especially here, overriding TEST_IMG inside 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.
>>> 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.
>> 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?
> 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

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

* Re: [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol
  2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
                   ` (17 preceding siblings ...)
  2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 18/18] qemu-iotests: test 026 store blkdebug.cfg locally Peter Lieven
@ 2014-02-24 12:54 ` Stefan Hajnoczi
  2014-02-24 20:21   ` Peter Lieven
  18 siblings, 1 reply; 40+ messages in thread
From: Stefan Hajnoczi @ 2014-02-24 12:54 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Kevin Wolf, Fam Zheng, Stefan Hajnoczi, Jeff Cody, qemu-devel,
	Max Reitz, owasserm, Federico Simoncelli, ronniesahlberg,
	Wenchao Xia

On Sun, Jan 05, 2014 at 06:21:50PM +0100, Peter Lieven wrote:
> 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

Going through my email backlog.  What is the status of this series?

Stefan

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

* Re: [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol
  2014-02-24 12:54 ` [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Stefan Hajnoczi
@ 2014-02-24 20:21   ` Peter Lieven
  2014-02-25 10:49     ` Stefan Hajnoczi
  0 siblings, 1 reply; 40+ messages in thread
From: Peter Lieven @ 2014-02-24 20:21 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Kevin Wolf, Fam Zheng, Stefan Hajnoczi, Jeff Cody, qemu-devel,
	Max Reitz, owasserm, Federico Simoncelli, ronniesahlberg,
	Wenchao Xia

Am 24.02.2014 13:54, schrieb Stefan Hajnoczi:
> On Sun, Jan 05, 2014 at 06:21:50PM +0100, Peter Lieven wrote:
>> 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
> Going 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

>
> Stefan

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

* Re: [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol
  2014-02-24 20:21   ` Peter Lieven
@ 2014-02-25 10:49     ` Stefan Hajnoczi
  0 siblings, 0 replies; 40+ messages in thread
From: Stefan Hajnoczi @ 2014-02-25 10:49 UTC (permalink / raw)
  To: Peter Lieven
  Cc: Kevin Wolf, Fam Zheng, Stefan Hajnoczi, Jeff Cody, qemu-devel,
	Max Reitz, owasserm, Federico Simoncelli, ronniesahlberg,
	Wenchao Xia

On Mon, Feb 24, 2014 at 09:21:38PM +0100, Peter Lieven wrote:
> Am 24.02.2014 13:54, schrieb Stefan Hajnoczi:
> > On Sun, Jan 05, 2014 at 06:21:50PM +0100, Peter Lieven wrote:
> >> 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
> > Going 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

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

end of thread, other threads:[~2014-02-25 10:49 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-05 17:21 [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 01/18] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 02/18] qemu-iotests: enable support for NFS protocol Peter Lieven
2014-01-06 20:14   ` Jeff Cody
2014-01-06 22:19     ` Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 03/18] qemu-iotests: enable test 016 and 025 to work with " Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 04/18] qemu-iotests: fix test 013 to work with any protocol Peter Lieven
2014-01-06  5:31   ` Fam Zheng
2014-01-06  6:48     ` Peter Lieven
2014-01-06 10:09       ` Fam Zheng
2014-01-06 12:21         ` Peter Lieven
2014-01-06 12:47           ` Fam Zheng
2014-01-06 20:40       ` Jeff Cody
2014-01-06 22:35         ` Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 " Peter Lieven
2014-01-06  5:40   ` Fam Zheng
2014-01-06  6:49     ` Peter Lieven
2014-01-10 19:04       ` Kevin Wolf
2014-01-10 19:06         ` Peter Lieven
2014-01-10 19:14           ` Kevin Wolf
2014-01-10 19:36             ` Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 06/18] qemu-iotests: fix test 018 " Peter Lieven
2014-01-06  5:45   ` Fam Zheng
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 07/18] qemu-iotests: fix test 019 " Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 08/18] qemu-iotests: fix test 020 " Peter Lieven
2014-01-05 17:21 ` [Qemu-devel] [PATCHv2 09/18] qemu-iotests: fix test 024 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 10/18] qemu-iotests: fix test 028 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 11/18] qemu-iotests: fix test 034 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 12/18] qemu-iotests: fix test 037 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 13/18] qemu-iotests: fix test 038 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 14/18] qemu-iotests: fix test 043 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 15/18] qemu-iotests: fix test 046 " Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 16/18] qemu-iotests: fix expected output of test 067 Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 17/18] qemu-iotests: blacklist test 020 for NFS protocol Peter Lieven
2014-01-06  5:51   ` Fam Zheng
2014-01-06  6:41     ` Peter Lieven
2014-01-05 17:22 ` [Qemu-devel] [PATCHv2 18/18] qemu-iotests: test 026 store blkdebug.cfg locally Peter Lieven
2014-02-24 12:54 ` [Qemu-devel] [PATCHv2 00/18] qemu-iotests: adjust tests to work with the NFS protocol Stefan Hajnoczi
2014-02-24 20:21   ` Peter Lieven
2014-02-25 10:49     ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.