summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Huth2022-02-09 11:15:29 +0100
committerPaolo Bonzini2022-02-16 15:01:33 +0100
commit308c8475bc9d7e352125dea42950afbaf9daadfe (patch)
treed0d121cde95768461aa842490e4a8e1c210eb55d
parentmemory: Fix qemu crash on starting dirty log twice with stopped VM (diff)
downloadqemu-308c8475bc9d7e352125dea42950afbaf9daadfe.tar.gz
qemu-308c8475bc9d7e352125dea42950afbaf9daadfe.tar.xz
qemu-308c8475bc9d7e352125dea42950afbaf9daadfe.zip
tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode
When running in TAP mode, stdout is reserved for the TAP protocol. To see the "diff" of the failed test, we have to print it to stderr instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220209101530.3442837-8-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--tests/qemu-iotests/testrunner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 0eace147b8..9a94273975 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -404,7 +404,10 @@ class TestRunner(ContextManager['TestRunner']):
if res.status == 'fail':
failed.append(name)
if res.diff:
- print('\n'.join(res.diff))
+ if self.tap:
+ print('\n'.join(res.diff), file=sys.stderr)
+ else:
+ print('\n'.join(res.diff))
elif res.status == 'not run':
notrun.append(name)
elif res.status == 'pass':