Blame SOURCES/kvm-iotest-Fix-filtering-order-in-226.patch

7711c0
From 97f1ac94b611b8e6c319696ac8a92aded5395ef5 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 20 Mar 2019 17:12:05 +0100
7711c0
Subject: [PATCH 034/163] iotest: Fix filtering order in 226
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190320171206.19236-2-jsnow@redhat.com>
7711c0
Patchwork-id: 84960
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 1/2] iotest: Fix filtering order in 226
7711c0
Bugzilla: 1691018
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
7711c0
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
7711c0
7711c0
From: Max Reitz <mreitz@redhat.com>
7711c0
7711c0
The test directory should be filtered before the image format, otherwise
7711c0
the test will fail if the image format is part of the test directory,
7711c0
like so:
7711c0
7711c0
[...]
7711c0
-can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
7711c0
+can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory
7711c0
[...]
7711c0
7711c0
Signed-off-by: Max Reitz <mreitz@redhat.com>
7711c0
Reviewed-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
(cherry picked from commit d6e4ca902148f33cfaf117396f57c7fff7c635f0)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 tests/qemu-iotests/226 | 4 ++--
7711c0
 1 file changed, 2 insertions(+), 2 deletions(-)
7711c0
7711c0
diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226
7711c0
index 460aea2..a5a1f67 100755
7711c0
--- a/tests/qemu-iotests/226
7711c0
+++ b/tests/qemu-iotests/226
7711c0
@@ -52,10 +52,10 @@ for PROTO in "file" "host_device" "host_cdrom"; do
7711c0
     echo "=== Testing with driver:$PROTO ==="
7711c0
     echo
7711c0
     echo "== Testing RO =="
7711c0
-    $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
7711c0
+    $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
7711c0
     $QEMU_IO -c "open -r -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
7711c0
     echo "== Testing RW =="
7711c0
-    $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir
7711c0
+    $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt
7711c0
     $QEMU_IO -c "open -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt
7711c0
 done
7711c0
 
7711c0
-- 
7711c0
1.8.3.1
7711c0