From: Kevin Wolf <kwolf@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: Fam Zheng <famz@redhat.com>,
ronniesahlberg@gmail.com, Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
owasserm@redhat.com, Federico Simoncelli <fsimonce@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCHv2 05/18] qemu-iotests: fix tests 014 and 023 to work with any protocol
Date: Fri, 10 Jan 2014 20:04:28 +0100 [thread overview]
Message-ID: <20140110190428.GJ4276@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <52CA51EB.8060607@kamp.de>
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
next prev parent reply other threads:[~2014-01-10 19:04 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140110190428.GJ4276@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=fsimonce@redhat.com \
--cc=jcody@redhat.com \
--cc=mreitz@redhat.com \
--cc=owasserm@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.com \
--cc=xiawenc@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).