summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/qemurunner.py
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2023-02-09 10:09:34 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-10 09:25:41 +0000
commit3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff (patch)
tree72e52af19287d62402d9a018e4a0909cd56bc431 /meta/lib/oeqa/utils/qemurunner.py
parentcafe65d8cf7544edbd387f7f5f6d77c64c6b18fa (diff)
downloadopenembedded-core-3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff.tar.gz
oeqa qemurunner.py: add timeout to QMP calls
When a qemu machine hangs, the QMP calls can hang for ever too, and when this happens any failing test commands from ssh runner may be followed by dump_monitor() calls which then also hang. Hangs followed by hangs. Use runqemutime at setup and run_monitor() specific timeout for later calls. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 2e054447fc..bce00c696a 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -350,6 +350,8 @@ class QemuRunner:
return False
try:
+ # set timeout value for all QMP calls
+ self.qmp.settimeout(self.runqemutime)
self.qmp.connect()
connect_time = time.time()
self.logger.info("QMP connected to QEMU at %s and took %s seconds" %
@@ -628,6 +630,7 @@ class QemuRunner:
def run_monitor(self, command, args=None, timeout=60):
if hasattr(self, 'qmp') and self.qmp:
+ self.qmp.settimeout(timeout)
if args is not None:
return self.qmp.cmd(command, args)
else: