aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-04-24 14:54:46 +0200
committerKevin Wolf <kwolf@redhat.com>2020-04-30 17:51:07 +0200
commitfd586ce8bee50d98773436214dc9e644ddda54aa (patch)
tree96c8dd2c5a31c300a339e5f85f2de34d5bc16f2a /tests
parent955c7d6687fefcd903900a1e597fcbc896c661cd (diff)
iotests: Filter testfiles out in filter_img_info()
We want to keep TEST_IMG for the full path of the main test image, but filter_testfiles() must be called for other test images before replacing other things like the image format because the test directory path could contain the format as a substring. Insert a filter_testfiles() call between both. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200424125448.63318-9-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 7bc4934cd2..5f8c263d59 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -338,8 +338,9 @@ def filter_img_info(output, filename):
for line in output.split('\n'):
if 'disk size' in line or 'actual-size' in line:
continue
- line = line.replace(filename, 'TEST_IMG') \
- .replace(imgfmt, 'IMGFMT')
+ line = line.replace(filename, 'TEST_IMG')
+ line = filter_testfiles(line)
+ line = line.replace(imgfmt, 'IMGFMT')
line = re.sub('iters: [0-9]+', 'iters: XXX', line)
line = re.sub('uuid: [-a-f0-9]+', 'uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', line)
line = re.sub('cid: [0-9]+', 'cid: XXXXXXXXXX', line)