diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2017-12-01 11:30:12 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-10 22:41:41 +0000 |
commit | 49403368ccf3e469ac111afa259a38cc11e0b688 (patch) | |
tree | f67ec0241c83615ecaf9cdb22fc788087748ce41 /meta/lib/oeqa/utils/qemurunner.py | |
parent | 4a6364309547d77d1d7a94c48f7c51ceee2b5d1a (diff) | |
download | openembedded-core-49403368ccf3e469ac111afa259a38cc11e0b688.tar.gz openembedded-core-49403368ccf3e469ac111afa259a38cc11e0b688.tar.bz2 openembedded-core-49403368ccf3e469ac111afa259a38cc11e0b688.zip |
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.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 8 |
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: (time.time() - (endtime - self.boottime), time.strftime("%D %H:%M:%S"))) else: + # no need to check if reachedlogin unless we support multiple connections + self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" % + time.strftime("%D %H:%M:%S")) socklist.remove(sock) sock.close() stopread = True if not reachedlogin: - self.logger.debug("Target didn't reached login boot in %d seconds (%s)" % - (self.boottime, time.strftime("%D %H:%M:%S"))) + if time.time() >= endtime: + self.logger.debug("Target didn't reached login boot in %d seconds (%s)" % + (self.boottime, time.strftime("%D %H:%M:%S"))) tail = lambda l: "\n".join(l.splitlines()[-25:]) # in case bootlog is empty, use tail qemu log store at self.msg lines = tail(bootlog if bootlog else self.msg) |