]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa: qemurunner: Report UNIX Epoch timestamp on login
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 9 Sep 2022 14:33:01 +0000 (09:33 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Sep 2022 07:31:22 +0000 (08:31 +0100)
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 <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index 07018b7de8bb0a70c425b877a2d8b093c0eb3797..948f8adc9f1edc6df9c801c67861a6c9bcdf3bed 100644 (file)
@@ -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)" %