[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/39] tests/functional: logs details of console interaction oper
From: |
Alex Bennée |
Subject: |
[PATCH 12/39] tests/functional: logs details of console interaction operations |
Date: |
Thu, 21 Nov 2024 16:57:39 +0000 |
From: Daniel P. Berrangé <berrange@redhat.com>
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>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/functional/qemu_test/cmd.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/functional/qemu_test/cmd.py
b/tests/functional/qemu_test/cmd.py
index cbabb1ceed..98722a9cf6 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())
--
2.39.5
- [PATCH 08/39] tests/functional: honour self.workdir in ACPI bits tests, (continued)
- [PATCH 08/39] tests/functional: honour self.workdir in ACPI bits tests, Alex Bennée, 2024/11/21
- [PATCH 09/39] tests/functional: put QEMUMachine logs in testcase log directory, Alex Bennée, 2024/11/21
- [PATCH 13/39] tests/functional: don't try to wait for the empty string, Alex Bennée, 2024/11/21
- [PATCH 14/39] tests/functional: require non-NULL success_message for console wait, Alex Bennée, 2024/11/21
- [PATCH 11/39] tests/functional: enable debug logging for QEMUMachine, Alex Bennée, 2024/11/21
- [PATCH 16/39] tests/functional: remove time.sleep usage from tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 12/39] tests/functional: logs details of console interaction operations,
Alex Bennée <=
- [PATCH 28/39] tests/functional: update the ppc32 tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 34/39] tests/functional: update the x86_64 tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 36/39] plugins: detect qemu plugin API symbols from header, Alex Bennée, 2024/11/21
- [PATCH 32/39] tests/functional: update the s390x tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 30/39] tests/functional: update the riscv32 tuxrun tests, Alex Bennée, 2024/11/21