qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size
@ 2011-06-08 11:23 Kevin Wolf
  2011-06-08 12:44 ` Stefan Hajnoczi
  2011-06-09  9:33 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Wolf @ 2011-06-08 11:23 UTC (permalink / raw)
  To: hch; +Cc: kwolf, qemu-devel

Until recently, qemu-img create displayed cluster_size=0 for the default
cluster size. It is changed to display the real cluster size now, which results
in the cluster size not being filtered out any more.

If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output,
and if using the default, filter it out. This mostly restores the old behaviour
of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using
extra_img_options for it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 015       |    3 ++-
 common.rc |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/015 b/015
index bdafd26..44c134f 100755
--- a/015
+++ b/015
@@ -56,7 +56,8 @@ echo "creating image"
 # for the refcount table. On the other hand this is big enough to cause a
 # refcount table growth when rewriting the image after creating one snapshot.
 size=36M
-_make_test_img -o cluster_size=1k $size
+CLUSTER_SIZE=1k
+_make_test_img $size
 
 # Create two snapshots which fill the image with two different patterns
 echo "creating first snapshot"
diff --git a/common.rc b/common.rc
index cdefafc..26811ca 100644
--- a/common.rc
+++ b/common.rc
@@ -58,9 +58,11 @@ _make_test_img()
     # extra qemu-img options can be added by tests
     # at least one argument (the image size) needs to be added
     local extra_img_options=$*
+    local cluster_size_filter="s# cluster_size=[0-9]\\+##g"
 
     if [ \( "$IMGFMT" = "qcow2" -o "$IMGFMT" = "qed" \) -a -n "$CLUSTER_SIZE" ]; then
         extra_img_options="-o cluster_size=$CLUSTER_SIZE $extra_img_options"
+        cluster_size_filter=""
     fi
 
     # XXX(hch): have global image options?
@@ -69,7 +71,7 @@ _make_test_img()
     	sed -e "s#$TEST_DIR#TEST_DIR#g" | \
     	sed -e "s#$IMGFMT#IMGFMT#g" | \
 	sed -e "s# encryption=off##g" | \
-	sed -e "s# cluster_size=0##g" | \
+	sed -e "$cluster_size_filter" | \
 	sed -e "s# table_size=0##g" | \
 	sed -e "s# compat6=off##g" | \
 	sed -e "s# static=off##g"
-- 
1.7.5.2

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

* Re: [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size
  2011-06-08 11:23 [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size Kevin Wolf
@ 2011-06-08 12:44 ` Stefan Hajnoczi
  2011-06-09  9:33 ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2011-06-08 12:44 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: hch, qemu-devel

On Wed, Jun 8, 2011 at 12:23 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> Until recently, qemu-img create displayed cluster_size=0 for the default
> cluster size. It is changed to display the real cluster size now, which results
> in the cluster size not being filtered out any more.
>
> If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output,
> and if using the default, filter it out. This mostly restores the old behaviour
> of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using
> extra_img_options for it.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  015       |    3 ++-
>  common.rc |    4 +++-
>  2 files changed, 5 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

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

* Re: [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size
  2011-06-08 11:23 [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size Kevin Wolf
  2011-06-08 12:44 ` Stefan Hajnoczi
@ 2011-06-09  9:33 ` Christoph Hellwig
  2011-06-09  9:47   ` Andreas Färber
  1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2011-06-09  9:33 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: hch, qemu-devel

Thanks, applied.

And sorry, I did it before reading stefan's review, so the tag is missing in
the commit.

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

* Re: [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size
  2011-06-09  9:33 ` Christoph Hellwig
@ 2011-06-09  9:47   ` Andreas Färber
  2011-06-09  9:57     ` Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2011-06-09  9:47 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Kevin Wolf, qemu-devel

Am 09.06.2011 um 11:33 schrieb Christoph Hellwig:

> Thanks, applied.
>
> And sorry, I did it before reading stefan's review, so the tag is  
> missing in
> the commit.


git commit --amend # if the last one or
git rebase -i origin/master # with r[eword] :)

Andreas

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

* Re: [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size
  2011-06-09  9:47   ` Andreas Färber
@ 2011-06-09  9:57     ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2011-06-09  9:57 UTC (permalink / raw)
  To: Andreas F?rber; +Cc: Kevin Wolf, qemu-devel

On Thu, Jun 09, 2011 at 11:47:24AM +0200, Andreas F?rber wrote:
> Am 09.06.2011 um 11:33 schrieb Christoph Hellwig:
>
>> Thanks, applied.
>>
>> And sorry, I did it before reading stefan's review, so the tag is missing 
>> in
>> the commit.
>
>
> git commit --amend # if the last one or
> git rebase -i origin/master # with r[eword] :)

I've already pushed it out to the public repository, so I really don't
want to change things that cause trouble for people pulling the repository.

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

end of thread, other threads:[~2011-06-09  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-08 11:23 [Qemu-devel] [PATCH] [qemu-iotests] Update filter for default cluster size Kevin Wolf
2011-06-08 12:44 ` Stefan Hajnoczi
2011-06-09  9:33 ` Christoph Hellwig
2011-06-09  9:47   ` Andreas Färber
2011-06-09  9:57     ` Christoph Hellwig

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