All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] iotest: Fix filtering order in 226
@ 2018-07-13 19:41 Max Reitz
  2018-07-13 20:14 ` John Snow
  0 siblings, 1 reply; 3+ messages in thread
From: Max Reitz @ 2018-07-13 19:41 UTC (permalink / raw)
  To: qemu-block; +Cc: qemu-devel, Max Reitz, Kevin Wolf, John Snow

The test directory should be filtered before the image format, otherwise
the test will fail if the image format is part of the test directory,
like so:

[...]
-can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
+can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory
[...]

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/226 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226
index 460aea2fc9..a5a1f6720a 100755
--- a/tests/qemu-iotests/226
+++ b/tests/qemu-iotests/226
@@ -52,10 +52,10 @@ for PROTO in "file" "host_device" "host_cdrom"; do
     echo "=== Testing with driver:$PROTO ==="
     echo
     echo "== Testing RO =="
-    $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
+    $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
     $QEMU_IO -c "open -r -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
     echo "== Testing RW =="
-    $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
+    $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
     $QEMU_IO -c "open -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
 done
 
-- 
2.17.1

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

* Re: [Qemu-devel] [PATCH] iotest: Fix filtering order in 226
  2018-07-13 19:41 [Qemu-devel] [PATCH] iotest: Fix filtering order in 226 Max Reitz
@ 2018-07-13 20:14 ` John Snow
  2018-07-23 13:55   ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: John Snow @ 2018-07-13 20:14 UTC (permalink / raw)
  To: Max Reitz, qemu-block; +Cc: Kevin Wolf, qemu-devel



On 07/13/2018 03:41 PM, Max Reitz wrote:
> The test directory should be filtered before the image format, otherwise
> the test will fail if the image format is part of the test directory,
> like so:
> 
> [...]
> -can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
> +can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory
> [...]
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>

Too many gotchas in our test suite.

Thanks :(

Reviewed-by: John Snow <jsnow@redhat.com>

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

* Re: [Qemu-devel] [PATCH] iotest: Fix filtering order in 226
  2018-07-13 20:14 ` John Snow
@ 2018-07-23 13:55   ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2018-07-23 13:55 UTC (permalink / raw)
  To: John Snow; +Cc: Max Reitz, qemu-block, qemu-devel

Am 13.07.2018 um 22:14 hat John Snow geschrieben:
> 
> 
> On 07/13/2018 03:41 PM, Max Reitz wrote:
> > The test directory should be filtered before the image format, otherwise
> > the test will fail if the image format is part of the test directory,
> > like so:
> > 
> > [...]
> > -can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
> > +can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory
> > [...]
> > 
> > Signed-off-by: Max Reitz <mreitz@redhat.com>
> 
> Too many gotchas in our test suite.
> 
> Thanks :(

Maybe we should start writing tests for our tests? ;-)

Thanks, applied to the block branch.

Kevin

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

end of thread, other threads:[~2018-07-23 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13 19:41 [Qemu-devel] [PATCH] iotest: Fix filtering order in 226 Max Reitz
2018-07-13 20:14 ` John Snow
2018-07-23 13:55   ` Kevin Wolf

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.