[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine |
Date: |
Thu, 21 Nov 2024 15:42:11 +0000 |
Set the 'qemu.machine' logger to 'DEBUG' level, to ensure we see log
messages related to the QEMUMachine class. Most importantly this
ensures we capture the full QEMU command line args for instances we
spawn.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/functional/qemu_test/testcase.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/functional/qemu_test/testcase.py
b/tests/functional/qemu_test/testcase.py
index f9c9de1166..e2a329c3e5 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -57,9 +57,15 @@ def setUp(self, bin_prefix):
self._log_fh.setFormatter(fileFormatter)
self.log.addHandler(self._log_fh)
+ # Capture QEMUMachine logging
+ self.machinelog = logging.getLogger('qemu.machine')
+ self.machinelog.setLevel(logging.DEBUG)
+ self.machinelog.addHandler(self._log_fh)
+
def tearDown(self):
if "QEMU_TEST_KEEP_SCRATCH" not in os.environ:
shutil.rmtree(self.workdir)
+ self.machinelog.removeHandler(self._log_fh)
self.log.removeHandler(self._log_fh)
def main():
--
2.46.0
- [PATCH v2 01/18] tests/functional: fix mips64el test to honour workdir, (continued)
- [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é, 2024/11/21
- [PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine,
Daniel P . Berrangé <=
- [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