aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-11-21 16:57:39 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-11-25 10:13:41 +0000
commit6f0942b723df9441fe3304e8ab6d87bb17f88a1e (patch)
tree8b04bb60c6970d84b60fcc5395e8a5f7c916df83
parent9bcfead1ee1c5d37c39b129557e1528879270fea (diff)
downloadqemu-6f0942b723df9441fe3304e8ab6d87bb17f88a1e.zip
qemu-6f0942b723df9441fe3304e8ab6d87bb17f88a1e.tar.gz
qemu-6f0942b723df9441fe3304e8ab6d87bb17f88a1e.tar.bz2
tests/functional: logs details of console interaction operations
When functional tests go wrong, it will often be related to the console interaction wait state. By logging the messages that we're looking for, and data we're about to be sending, it'll be easier to diagnose where tests are getting stuck. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20241121154218.1423005-13-berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20241121165806.476008-13-alex.bennee@linaro.org>
-rw-r--r--tests/functional/qemu_test/cmd.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test/cmd.py
index cbabb1c..98722a9 100644
--- a/tests/functional/qemu_test/cmd.py
+++ b/tests/functional/qemu_test/cmd.py
@@ -85,6 +85,9 @@ def _console_interaction(test, success_message, failure_message,
vm = test.vm
console = vm.console_file
console_logger = logging.getLogger('console')
+ test.log.debug(
+ f"Console interaction: success_msg='{success_message}' " +
+ f"failure_msg='{failure_message}' send_string='{send_string}'")
while True:
if send_string:
vm.console_socket.sendall(send_string.encode())