[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v13 06/31] iotests.py: Add filter_imgfmt()
From: |
Max Reitz |
Subject: |
[Qemu-block] [PATCH v13 06/31] iotests.py: Add filter_imgfmt() |
Date: |
Fri, 1 Feb 2019 20:29:10 +0100 |
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/iotests.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index c323c62d20..8c5dd40f83 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -312,6 +312,16 @@ def filter_img_info(output, filename):
lines.append(line)
return '\n'.join(lines)
+def filter_imgfmt(msg):
+ return msg.replace(imgfmt, 'IMGFMT')
+
+def filter_qmp_imgfmt(qmsg):
+ def _filter(key, value):
+ if is_str(value):
+ return filter_imgfmt(value)
+ return value
+ return filter_qmp(qmsg, _filter)
+
def log(msg, filters=[], indent=None):
'''Logs either a string message or a JSON serializable message (like QMP).
If indent is provided, JSON serializable messages are pretty-printed.'''
--
2.20.1
- [Qemu-block] [PATCH v13 00/31] Fix some filename generation issues, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 03/31] block: Skip implicit nodes for filename info, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 06/31] iotests.py: Add filter_imgfmt(),
Max Reitz <=
- [Qemu-block] [PATCH v13 02/31] block: Use children list in bdrv_refresh_filename, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 07/31] iotests.py: Add node_info(), Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 01/31] block: Use bdrv_refresh_filename() to pull, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 04/31] block: Add BDS.auto_backing_file, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 05/31] block: Respect backing bs in bdrv_refresh_filename, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 09/31] block: Make path_combine() return the path, Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val., Max Reitz, 2019/02/01
- [Qemu-block] [PATCH v13 08/31] iotests: Add test for backing file overrides, Max Reitz, 2019/02/01