Add a filter_qemu() helper function for replacing the QEMU program name with 'QEMU_PROG' in test's log messages.
Signed-off-by: Fiona Ebner <[email protected]> --- tests/qemu-iotests/iotests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 7d5a77a85e..642a160bb2 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -596,6 +596,10 @@ def filter_qemu_io(msg): return qemu_io_re.sub("X ops; XX:XX:XX.X " "(XXX YYY/sec and XXX ops/sec)", msg) +qemu_re = re.compile(r"%s" % os.path.basename(qemu_prog)) +def filter_qemu(msg): + return qemu_re.sub("QEMU_PROG", msg) + chown_re = re.compile(r"chown [0-9]+:[0-9]+") def filter_chown(msg): return chown_re.sub("chown UID:GID", msg) -- 2.47.3
