[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/39] tests/functional: enable debug logging for QEMUMachine
From: |
Alex Bennée |
Subject: |
[PATCH 11/39] tests/functional: enable debug logging for QEMUMachine |
Date: |
Thu, 21 Nov 2024 16:57:38 +0000 |
From: Daniel P. Berrangé <berrange@redhat.com>
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>
Message-Id: <20241121154218.1423005-12-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
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.39.5
- [PATCH 06/39] tests/functional: remove obsolete reference to avocado bug, (continued)
- [PATCH 06/39] tests/functional: remove obsolete reference to avocado bug, 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 16/39] tests/functional: remove time.sleep usage from tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 31/39] tests/functional: update the riscv64 tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 30/39] tests/functional: update the riscv32 tuxrun tests, Alex Bennée, 2024/11/21
- [PATCH 11/39] tests/functional: enable debug logging for QEMUMachine,
Alex Bennée <=
- [PATCH 14/39] tests/functional: require non-NULL success_message for console wait, Alex Bennée, 2024/11/21
- [PATCH 12/39] tests/functional: logs details of console interaction operations, Alex Bennée, 2024/11/21
- [PATCH 32/39] tests/functional: update the s390x 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 28/39] tests/functional: update the ppc32 tuxrun tests, Alex Bennée, 2024/11/21