All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iotests/197: Fix for non-qcow2 formats
@ 2020-07-28 12:21 Max Reitz
  2020-07-28 12:51 ` Thomas Huth
  2020-07-28 13:21 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Max Reitz @ 2020-07-28 12:21 UTC (permalink / raw)
  To: qemu-block; +Cc: Kevin Wolf, Thomas Huth, qemu-devel, Max Reitz

While 197 is very much a qcow2 test, and it looks like the partial
cluster case at the end (introduced in b0ddcbbb36a66a6) is specifically
a qcow2 case, the whole test scripts actually marks itself to work with
generic formats (and generic protocols, even).

Said partial cluster case happened to work with non-qcow2 formats as
well (mostly by accident), but 1855536256 broke that, because it sets
the compat option, which does not work for non-qcow2 formats.

So go the whole way and force IMGFMT=qcow2 and IMGPROTO=file, as done in
other places in this test.

Fixes: 1855536256eb0a5708b04b85f744de69559ea323
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/197     | 8 +++++---
 tests/qemu-iotests/197.out | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/197 b/tests/qemu-iotests/197
index 121959a09c..7d723b0a56 100755
--- a/tests/qemu-iotests/197
+++ b/tests/qemu-iotests/197
@@ -114,9 +114,11 @@ echo
 
 # Force compat=1.1, because writing zeroes on a v2 image without a
 # backing file would just result in an unallocated cluster
-_make_test_img -o compat=1.1 1024
-$QEMU_IO -f $IMGFMT -C -c 'read 0 1024' "$TEST_IMG" | _filter_qemu_io
-$QEMU_IO -f $IMGFMT -c map "$TEST_IMG"
+# (Also, note that this is really a pure qcow2 test.)
+IMGPROTO=file IMGFMT=qcow2 TEST_IMG_FILE="$TEST_WRAP" \
+    _make_test_img -o compat=1.1 1024
+$QEMU_IO -f qcow2 -C -c 'read 0 1024' "$TEST_WRAP" | _filter_qemu_io
+$QEMU_IO -f qcow2 -c map "$TEST_WRAP"
 _check_test_img
 
 # success, all done
diff --git a/tests/qemu-iotests/197.out b/tests/qemu-iotests/197.out
index 7ca46be6e4..ad414c3b0e 100644
--- a/tests/qemu-iotests/197.out
+++ b/tests/qemu-iotests/197.out
@@ -26,7 +26,7 @@ Images are identical.
 
 === Partial final cluster ===
 
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024
+Formatting 'TEST_DIR/t.wrap.IMGFMT', fmt=IMGFMT size=1024
 read 1024/1024 bytes at offset 0
 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 1 KiB (0x400) bytes     allocated at offset 0 bytes (0x0)
-- 
2.26.2



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

* Re: [PATCH] iotests/197: Fix for non-qcow2 formats
  2020-07-28 12:21 [PATCH] iotests/197: Fix for non-qcow2 formats Max Reitz
@ 2020-07-28 12:51 ` Thomas Huth
  2020-07-28 13:21 ` Eric Blake
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2020-07-28 12:51 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: Kevin Wolf, qemu-devel

On 28/07/2020 14.21, Max Reitz wrote:
> While 197 is very much a qcow2 test, and it looks like the partial
> cluster case at the end (introduced in b0ddcbbb36a66a6) is specifically
> a qcow2 case, the whole test scripts actually marks itself to work with
> generic formats (and generic protocols, even).
> 
> Said partial cluster case happened to work with non-qcow2 formats as
> well (mostly by accident), but 1855536256 broke that, because it sets
> the compat option, which does not work for non-qcow2 formats.
> 
> So go the whole way and force IMGFMT=qcow2 and IMGPROTO=file, as done in
> other places in this test.
> 
> Fixes: 1855536256eb0a5708b04b85f744de69559ea323
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/197     | 8 +++++---
>  tests/qemu-iotests/197.out | 2 +-
>  2 files changed, 6 insertions(+), 4 deletions(-)

Thanks, that fixes the issue for me, indeed!

Tested-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH] iotests/197: Fix for non-qcow2 formats
  2020-07-28 12:21 [PATCH] iotests/197: Fix for non-qcow2 formats Max Reitz
  2020-07-28 12:51 ` Thomas Huth
@ 2020-07-28 13:21 ` Eric Blake
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2020-07-28 13:21 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: Kevin Wolf, Thomas Huth, qemu-devel

On 7/28/20 7:21 AM, Max Reitz wrote:
> While 197 is very much a qcow2 test, and it looks like the partial
> cluster case at the end (introduced in b0ddcbbb36a66a6) is specifically
> a qcow2 case, the whole test scripts actually marks itself to work with
> generic formats (and generic protocols, even).
> 
> Said partial cluster case happened to work with non-qcow2 formats as
> well (mostly by accident), but 1855536256 broke that, because it sets
> the compat option, which does not work for non-qcow2 formats.
> 
> So go the whole way and force IMGFMT=qcow2 and IMGPROTO=file, as done in
> other places in this test.
> 
> Fixes: 1855536256eb0a5708b04b85f744de69559ea323
> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>   tests/qemu-iotests/197     | 8 +++++---
>   tests/qemu-iotests/197.out | 2 +-
>   2 files changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



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

end of thread, other threads:[~2020-07-28 13:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 12:21 [PATCH] iotests/197: Fix for non-qcow2 formats Max Reitz
2020-07-28 12:51 ` Thomas Huth
2020-07-28 13:21 ` Eric Blake

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.