oeqa/qemurunner: Ensure we retry after BrokenPipeError

If the BrokenPipeError occurs when writing to the serial port to wake it
up, defer the write and try again (which will happen on the 5s timeout
of the select call). Why it should return ESHUTDOWN and then work later
I'm not sure but it does appear to make it work. For now we need 'working'
QA tests whilst the issue is debugged.

(From OE-Core rev: ea9e6ba0ab31a0b20012c283aa768496a50b527a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2023-10-10 14:31:20 +01:00
parent b36cbd3f2b
commit 4411460016

View File

@@ -465,9 +465,9 @@ class QemuRunner:
self.logger.warning('Probing the serial port to wake it up!')
try:
self.server_socket.sendall(bytes("\n\n", "utf-8"))
sentnewlines = True
except BrokenPipeError as e:
self.logger.debug('Probe failed %s' % repr(e))
sentnewlines = True
for file in sread:
if file is self.server_socket:
qemusock, addr = self.server_socket.accept()