Blame SOURCES/kvm-iotests-Filter-testfiles-out-in-filter_img_info.patch

902636
From 8dc8a17d4e98aae41db01cbc073e69de44291b63 Mon Sep 17 00:00:00 2001
902636
From: Kevin Wolf <kwolf@redhat.com>
902636
Date: Mon, 8 Jun 2020 15:01:38 +0100
902636
Subject: [PATCH 10/17] iotests: Filter testfiles out in filter_img_info()
902636
902636
RH-Author: Kevin Wolf <kwolf@redhat.com>
902636
Message-id: <20200608150140.38218-10-kwolf@redhat.com>
902636
Patchwork-id: 97455
902636
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 09/11] iotests: Filter testfiles out in filter_img_info()
902636
Bugzilla: 1780574
902636
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
902636
RH-Acked-by: Eric Blake <eblake@redhat.com>
902636
RH-Acked-by: Max Reitz <mreitz@redhat.com>
902636
902636
We want to keep TEST_IMG for the full path of the main test image, but
902636
filter_testfiles() must be called for other test images before replacing
902636
other things like the image format because the test directory path could
902636
contain the format as a substring.
902636
902636
Insert a filter_testfiles() call between both.
902636
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Reviewed-by: Max Reitz <mreitz@redhat.com>
902636
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
902636
Message-Id: <20200424125448.63318-9-kwolf@redhat.com>
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
(cherry picked from commit fd586ce8bee50d98773436214dc9e644ddda54aa)
902636
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 tests/qemu-iotests/iotests.py | 5 +++--
902636
 1 file changed, 3 insertions(+), 2 deletions(-)
902636
902636
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
902636
index 7a9c779..cd5df36 100644
902636
--- a/tests/qemu-iotests/iotests.py
902636
+++ b/tests/qemu-iotests/iotests.py
902636
@@ -335,8 +335,9 @@ def filter_img_info(output, filename):
902636
     for line in output.split('\n'):
902636
         if 'disk size' in line or 'actual-size' in line:
902636
             continue
902636
-        line = line.replace(filename, 'TEST_IMG') \
902636
-                   .replace(imgfmt, 'IMGFMT')
902636
+        line = line.replace(filename, 'TEST_IMG')
902636
+        line = filter_testfiles(line)
902636
+        line = line.replace(imgfmt, 'IMGFMT')
902636
         line = re.sub('iters: [0-9]+', 'iters: XXX', line)
902636
         line = re.sub('uuid: [-a-f0-9]+', 'uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', line)
902636
         line = re.sub('cid: [0-9]+', 'cid: XXXXXXXXXX', line)
902636
-- 
902636
1.8.3.1
902636