From: Joshua Watt Date: Fri, 9 Sep 2022 14:33:01 +0000 (-0500) Subject: oeqa: qemurunner: Report UNIX Epoch timestamp on login X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~2979 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=275b6f3c8d0eeafa3902c48a49655491a89c47bc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa: qemurunner: Report UNIX Epoch timestamp on login Updates the log message printed when login banner is seen in QEMU to report the UNIX Epoch time in addition to the human readable time. This makes it much easier and accurate to correlate logs with the guest, in particular with the guest journalctl which prints log timestamps in human readable format and the oeqa SSH debug logging which prints the UNIX Epoch. Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 07018b7de8b..948f8adc9f1 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -472,9 +472,9 @@ class QemuRunner: self.server_socket = qemusock stopread = True reachedlogin = True - self.logger.debug("Reached login banner in %s seconds (%s)" % + self.logger.debug("Reached login banner in %s seconds (%s, %s)" % (time.time() - (endtime - self.boottime), - time.strftime("%D %H:%M:%S"))) + time.strftime("%D %H:%M:%S"), time.time())) else: # no need to check if reachedlogin unless we support multiple connections self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" %