[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/18] tests/functional: logs details of console interaction o
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 12/18] tests/functional: logs details of console interaction operations |
Date: |
Thu, 21 Nov 2024 15:42:12 +0000 |
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>
---
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.46.0
- [PATCH v2 00/18] test/functional: improve functional test debugging & fix tuxrun, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 01/18] tests/functional: fix mips64el test to honour workdir, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 02/18] tests/functional: automatically clean up scratch files after tests, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 03/18] tests/functional: remove "AVOCADO" from env variable name, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 04/18] tests/functional: remove todo wrt avocado.utils.wait_for, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 05/18] tests/functional: remove leftover :avocado: tags, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 06/18] tests/functional: remove obsolete reference to avocado bug, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 09/18] tests/functional: put QEMUMachine logs in testcase log directory, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 07/18] tests/functional: remove comments talking about avocado, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 10/18] tests/functional: honour requested test VM name in QEMUMachine, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 12/18] tests/functional: logs details of console interaction operations,
Daniel P . Berrangé <=
- [PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 08/18] tests/functional: honour self.workdir in ACPI bits tests, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 13/18] tests/functional: don't try to wait for the empty string, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 14/18] tests/functional: require non-NULL success_message for console wait, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 15/18] tests/functional: rewrite console handling to be bytewise, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 16/18] tests/functional: remove time.sleep usage from tuxrun tests, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 17/18] tests/functional: add a QMP backdoor for debugging stalled tests, Daniel P . Berrangé, 2024/11/21
- [PATCH v2 18/18] tests/functional: avoid accessing log_filename on earlier failures, Daniel P . Berrangé, 2024/11/21
- Re: [PATCH v2 00/18] test/functional: improve functional test debugging & fix tuxrun, Alex Bennée, 2024/11/21