qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc
@ 2017-12-05  1:08 John Snow
  2017-12-05  9:05 ` Lukáš Doktor
  2017-12-08 14:29 ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: John Snow @ 2017-12-05  1:08 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, ldoktor, qemu-devel, mreitz, John Snow

VPC has some difficulty creating geometries of particular size.
However, we can indeed force it to use a literal one, so let's
do that for the sake of test 197, which is testing some specific
offsets.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 tests/qemu-iotests/197           | 4 ++++
 tests/qemu-iotests/common.filter | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197
index 887eb4f496..5e869fe2b7 100755
--- a/tests/qemu-iotests/197
+++ b/tests/qemu-iotests/197
@@ -60,6 +60,10 @@ echo '=== Copy-on-read ==='
 echo
 
 # Prep the images
+# VPC rounds image sizes to a specific geometry, force a specific size.
+if [ "$IMGFMT" = "vpc" ]; then
+    IMGOPTS=$(_optstr_add "$IMGOPTS" "force_size")
+fi
 _make_test_img 4G
 $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
 IMGPROTO=file IMGFMT=qcow2 IMGOPTS= TEST_IMG_FILE="$TEST_WRAP" \
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index d9237799e9..f08248bfd9 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -134,7 +134,8 @@ _filter_img_create()
         -e "s# log_size=[0-9]\\+##g" \
         -e "s# refcount_bits=[0-9]\\+##g" \
         -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
-        -e "s# iter-time=[0-9]\\+##g"
+        -e "s# iter-time=[0-9]\\+##g" \
+        -e "s# force_size=\\(on\\|off\\)##g"
 }
 
 _filter_img_info()
-- 
2.14.3

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

* Re: [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc
  2017-12-05  1:08 [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc John Snow
@ 2017-12-05  9:05 ` Lukáš Doktor
  2017-12-08 14:29 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Lukáš Doktor @ 2017-12-05  9:05 UTC (permalink / raw)
  To: John Snow, qemu-block; +Cc: kwolf, qemu-devel, mreitz

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

Dne 5.12.2017 v 02:08 John Snow napsal(a):
> VPC has some difficulty creating geometries of particular size.
> However, we can indeed force it to use a literal one, so let's
> do that for the sake of test 197, which is testing some specific
> offsets.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/qemu-iotests/197           | 4 ++++
>  tests/qemu-iotests/common.filter | 3 ++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197
> index 887eb4f496..5e869fe2b7 100755
> --- a/tests/qemu-iotests/197
> +++ b/tests/qemu-iotests/197
> @@ -60,6 +60,10 @@ echo '=== Copy-on-read ==='
>  echo
>  
>  # Prep the images
> +# VPC rounds image sizes to a specific geometry, force a specific size.
> +if [ "$IMGFMT" = "vpc" ]; then
> +    IMGOPTS=$(_optstr_add "$IMGOPTS" "force_size")
> +fi

Yep, the comment is helpful and it works well. (well "-nbd -vpc" fails, but that is another story)

Reviewed-by: Lukáš Doktor <ldoktor@redhat.com> 


>  _make_test_img 4G
>  $QEMU_IO -c "write -P 55 3G 1k" "$TEST_IMG" | _filter_qemu_io
>  IMGPROTO=file IMGFMT=qcow2 IMGOPTS= TEST_IMG_FILE="$TEST_WRAP" \
> diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
> index d9237799e9..f08248bfd9 100644
> --- a/tests/qemu-iotests/common.filter
> +++ b/tests/qemu-iotests/common.filter
> @@ -134,7 +134,8 @@ _filter_img_create()
>          -e "s# log_size=[0-9]\\+##g" \
>          -e "s# refcount_bits=[0-9]\\+##g" \
>          -e "s# key-secret=[a-zA-Z0-9]\\+##g" \
> -        -e "s# iter-time=[0-9]\\+##g"
> +        -e "s# iter-time=[0-9]\\+##g" \
> +        -e "s# force_size=\\(on\\|off\\)##g"
>  }
>  
>  _filter_img_info()
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 502 bytes --]

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

* Re: [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc
  2017-12-05  1:08 [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc John Snow
  2017-12-05  9:05 ` Lukáš Doktor
@ 2017-12-08 14:29 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2017-12-08 14:29 UTC (permalink / raw)
  To: John Snow; +Cc: qemu-block, ldoktor, qemu-devel, mreitz

Am 05.12.2017 um 02:08 hat John Snow geschrieben:
> VPC has some difficulty creating geometries of particular size.
> However, we can indeed force it to use a literal one, so let's
> do that for the sake of test 197, which is testing some specific
> offsets.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Thanks, applied to block-next.

Kevin

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

end of thread, other threads:[~2017-12-08 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05  1:08 [Qemu-devel] [PATCH v2] iotests: fix 197 for vpc John Snow
2017-12-05  9:05 ` Lukáš Doktor
2017-12-08 14:29 ` Kevin Wolf

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