diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2023-02-09 10:09:33 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-02-18 06:41:49 -1000 |
commit | 62df87d3544b7fc3717743b131a62c6092359ec5 (patch) | |
tree | 930c8c16c7a31c8cd9f0101c87a9facf524d09ef | |
parent | d570e8f3d6ac05be200f5f4acbbd1a15a95fc122 (diff) | |
download | openembedded-core-62df87d3544b7fc3717743b131a62c6092359ec5.tar.gz |
oeqa qemurunner: read more data at a time from serial
Use a short sleep to bundle serial console reads so that
we are not reading one character at a time which reduces busy
looping.
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit cafe65d8cf7544edbd387f7f5f6d77c64c6b18fa)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index c68974f25c..3aeef19434 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -198,7 +198,7 @@ class QemuRunner: qmp_file = "." + next(tempfile._get_candidate_names()) qmp_param = ' -S -qmp unix:./%s,server,wait' % (qmp_file) qmp_port = self.tmpdir + "/" + qmp_file - # Create a second socket connection for debugging use, + # Create a second socket connection for debugging use, # note this will NOT cause qemu to block waiting for the connection qmp_file2 = "." + next(tempfile._get_candidate_names()) qmp_param += ' -qmp unix:./%s,server,nowait' % (qmp_file2) @@ -463,6 +463,8 @@ class QemuRunner: socklist.remove(self.server_socket) self.logger.debug("Connection from %s:%s" % addr) else: + # try to avoid reading only a single character at a time + time.sleep(0.1) data = data + sock.recv(1024) if data: bootlog += data |