From: Fiona Ebner <[email protected]> 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]> Message-ID: <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Eric Blake <[email protected]> (cherry picked from commit 9d2cdc4d3b716cf5c19af522237e8d3597d079c2) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 7292c8b342a..f225bc5f89b 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
