summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-12-01 11:30:12 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-10 22:45:20 +0000
commitc8f28c15e7b1355bab4964516873f53a3aec3e1d (patch)
tree2deb75d7c99f12dc2805c6b2686264e7056a01d7 /meta/lib/oeqa
parent6fca24f4992bcfb7bee13b201a7b8416517e3f70 (diff)
downloadpoky-c8f28c15e7b1355bab4964516873f53a3aec3e1d.tar.gz
utils: qemurunner.py: Log both 'failed to reach login banner" reasons
The current logging always assumes the boot timeout has expired yet there is a second reason we might have ended up in a position where no login banner was found, that being a socket disconnect. Add logging for the disconnect case and make the timeout expiration conditional on the timeout being exhausted. (From OE-Core rev: 49403368ccf3e469ac111afa259a38cc11e0b688) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 8296e989b1..dfcd63eab4 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -307,14 +307,18 @@ class QemuRunner:
307 (time.time() - (endtime - self.boottime), 307 (time.time() - (endtime - self.boottime),
308 time.strftime("%D %H:%M:%S"))) 308 time.strftime("%D %H:%M:%S")))
309 else: 309 else:
310 # no need to check if reachedlogin unless we support multiple connections
311 self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %
312 time.strftime("%D %H:%M:%S"))
310 socklist.remove(sock) 313 socklist.remove(sock)
311 sock.close() 314 sock.close()
312 stopread = True 315 stopread = True
313 316
314 317
315 if not reachedlogin: 318 if not reachedlogin:
316 self.logger.debug("Target didn't reached login boot in %d seconds (%s)" % 319 if time.time() >= endtime:
317 (self.boottime, time.strftime("%D %H:%M:%S"))) 320 self.logger.debug("Target didn't reached login boot in %d seconds (%s)" %
321 (self.boottime, time.strftime("%D %H:%M:%S")))
318 tail = lambda l: "\n".join(l.splitlines()[-25:]) 322 tail = lambda l: "\n".join(l.splitlines()[-25:])
319 # in case bootlog is empty, use tail qemu log store at self.msg 323 # in case bootlog is empty, use tail qemu log store at self.msg
320 lines = tail(bootlog if bootlog else self.msg) 324 lines = tail(bootlog if bootlog else self.msg)