From 0271d73b85d66b6b2990b00e0b55a058d5636e8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 28 Oct 2025 18:26:51 +0000 Subject: [PATCH] tests/functional: include the lower level QMP log messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We've seen a GitLab CI timeout failure in the test_pseries.py test, where it appears likely that the test has hung in a self.qmp('quit') call, but we don't have conclusive proof. Adding the QMP log category to what we capture should help us diagnose this, at the cost of the base.log file becoming significantly more verbose. The previous commit to include the logger category name and function should at least help understanding the more verbose logs. Signed-off-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Message-ID: <20251028182651.873256-3-berrange@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index d9d114e63e..1d773dd697 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -225,6 +225,9 @@ class QemuBaseTest(unittest.TestCase): self.machinelog = logging.getLogger('qemu.machine') self.machinelog.setLevel(logging.DEBUG) self.machinelog.addHandler(self._log_fh) + self.qmplog = logging.getLogger('qemu.qmp') + self.qmplog.setLevel(logging.DEBUG) + self.qmplog.addHandler(self._log_fh) if not self.assets_available(): self.skipTest('One or more assets is not available') @@ -235,6 +238,7 @@ class QemuBaseTest(unittest.TestCase): if self.socketdir is not None: self.socketdir.cleanup() self.socketdir = None + self.qmplog.removeHandler(self._log_fh) self.machinelog.removeHandler(self._log_fh) self.log.removeHandler(self._log_fh) self._log_fh.close() -- 2.47.3