diff options
author | Enrico Jörns <ejo@pengutronix.de> | 2023-03-31 12:26:20 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-31 23:30:36 +0100 |
commit | 6ef891415f8c1e581fdb2cfbf1c47f658d417cb6 (patch) | |
tree | 87f082288d2684e3a2f9a7cc48e46f1b2f37c0e0 /meta | |
parent | ff7b3d6810a968d7456af84940e9ceefdfc2598a (diff) | |
download | poky-6ef891415f8c1e581fdb2cfbf1c47f658d417cb6.tar.gz |
oeqa/utils/qemurunner: limit precision of timing debugging output
* There is no need to be that precise. It just irritates in the logs.
* There is also no point in printing plain time.time() value a single
time while only using formatted printout everywhere else, thus remove
it.
* Use %d for printing integer times
(From OE-Core rev: f0988cb8cf8d03708490cca4eba345492ef78d52)
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 9d6fe4fe59..623d45010a 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -275,7 +275,7 @@ class QemuRunner: | |||
275 | os._exit(0) | 275 | os._exit(0) |
276 | 276 | ||
277 | self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid) | 277 | self.logger.debug("runqemu started, pid is %s" % self.runqemu.pid) |
278 | self.logger.debug("waiting at most %s seconds for qemu pid (%s)" % | 278 | self.logger.debug("waiting at most %d seconds for qemu pid (%s)" % |
279 | (self.runqemutime, time.strftime("%D %H:%M:%S"))) | 279 | (self.runqemutime, time.strftime("%D %H:%M:%S"))) |
280 | endtime = time.time() + self.runqemutime | 280 | endtime = time.time() + self.runqemutime |
281 | while not self.is_alive() and time.time() < endtime: | 281 | while not self.is_alive() and time.time() < endtime: |
@@ -299,7 +299,7 @@ class QemuRunner: | |||
299 | self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode) | 299 | self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode) |
300 | 300 | ||
301 | if not self.is_alive(): | 301 | if not self.is_alive(): |
302 | self.logger.error("Qemu pid didn't appear in %s seconds (%s)" % | 302 | self.logger.error("Qemu pid didn't appear in %d seconds (%s)" % |
303 | (self.runqemutime, time.strftime("%D %H:%M:%S"))) | 303 | (self.runqemutime, time.strftime("%D %H:%M:%S"))) |
304 | 304 | ||
305 | qemu_pid = None | 305 | qemu_pid = None |
@@ -354,7 +354,7 @@ class QemuRunner: | |||
354 | self.qmp.settimeout(self.runqemutime) | 354 | self.qmp.settimeout(self.runqemutime) |
355 | self.qmp.connect() | 355 | self.qmp.connect() |
356 | connect_time = time.time() | 356 | connect_time = time.time() |
357 | self.logger.info("QMP connected to QEMU at %s and took %s seconds" % | 357 | self.logger.info("QMP connected to QEMU at %s and took %.2f seconds" % |
358 | (time.strftime("%D %H:%M:%S"), | 358 | (time.strftime("%D %H:%M:%S"), |
359 | time.time() - launch_time)) | 359 | time.time() - launch_time)) |
360 | except OSError as msg: | 360 | except OSError as msg: |
@@ -388,14 +388,14 @@ class QemuRunner: | |||
388 | 388 | ||
389 | # Release the qemu process to continue running | 389 | # Release the qemu process to continue running |
390 | self.run_monitor('cont') | 390 | self.run_monitor('cont') |
391 | self.logger.info("QMP released QEMU at %s and took %s seconds from connect" % | 391 | self.logger.info("QMP released QEMU at %s and took %.2f seconds from connect" % |
392 | (time.strftime("%D %H:%M:%S"), | 392 | (time.strftime("%D %H:%M:%S"), |
393 | time.time() - connect_time)) | 393 | time.time() - connect_time)) |
394 | 394 | ||
395 | # We are alive: qemu is running | 395 | # We are alive: qemu is running |
396 | out = self.getOutput(output) | 396 | out = self.getOutput(output) |
397 | netconf = False # network configuration is not required by default | 397 | netconf = False # network configuration is not required by default |
398 | self.logger.debug("qemu started in %s seconds - qemu procces pid is %s (%s)" % | 398 | self.logger.debug("qemu started in %.2f seconds - qemu procces pid is %s (%s)" % |
399 | (time.time() - (endtime - self.runqemutime), | 399 | (time.time() - (endtime - self.runqemutime), |
400 | self.qemupid, time.strftime("%D %H:%M:%S"))) | 400 | self.qemupid, time.strftime("%D %H:%M:%S"))) |
401 | cmdline = '' | 401 | cmdline = '' |
@@ -486,9 +486,9 @@ class QemuRunner: | |||
486 | self.server_socket = qemusock | 486 | self.server_socket = qemusock |
487 | stopread = True | 487 | stopread = True |
488 | reachedlogin = True | 488 | reachedlogin = True |
489 | self.logger.debug("Reached login banner in %s seconds (%s, %s)" % | 489 | self.logger.debug("Reached login banner in %.2f seconds (%s)" % |
490 | (time.time() - (endtime - self.boottime), | 490 | (time.time() - (endtime - self.boottime), |
491 | time.strftime("%D %H:%M:%S"), time.time())) | 491 | time.strftime("%D %H:%M:%S"))) |
492 | else: | 492 | else: |
493 | # no need to check if reachedlogin unless we support multiple connections | 493 | # no need to check if reachedlogin unless we support multiple connections |
494 | self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" % | 494 | self.logger.debug("QEMU socket disconnected before login banner reached. (%s)" % |