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

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