mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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. (From OE-Core rev: 3a07bdf77dc6ecbf4c620b051dd032abaaf1e4ff) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d61df4b220
commit
18bcccc8f8
@@ -350,6 +350,8 @@ class QemuRunner:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# set timeout value for all QMP calls
|
||||||
|
self.qmp.settimeout(self.runqemutime)
|
||||||
self.qmp.connect()
|
self.qmp.connect()
|
||||||
connect_time = time.time()
|
connect_time = time.time()
|
||||||
self.logger.info("QMP connected to QEMU at %s and took %s seconds" %
|
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):
|
def run_monitor(self, command, args=None, timeout=60):
|
||||||
if hasattr(self, 'qmp') and self.qmp:
|
if hasattr(self, 'qmp') and self.qmp:
|
||||||
|
self.qmp.settimeout(timeout)
|
||||||
if args is not None:
|
if args is not None:
|
||||||
return self.qmp.cmd(command, args)
|
return self.qmp.cmd(command, args)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user