diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2019-07-17 13:52:10 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-18 12:16:19 +0100 |
commit | 4841d57bdb038cb655c2a8dcd5552498d0389b03 (patch) | |
tree | d8b5b0646bc41f1c4a60c44bb4c6003408c2ac43 /meta/lib | |
parent | 29ee9756b8e465fc9dd6d7d0b32104e22bf1d9a4 (diff) | |
download | poky-4841d57bdb038cb655c2a8dcd5552498d0389b03.tar.gz |
qemurunner.py: Be more verbose about problems
Instead of hiding problems in the debug log let's print them as warnings
instead.
(From OE-Core rev: 088f5d97001bd4b573f00cfca93b8d24e814fd64)
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 68684aeb8a..b1999fde85 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -98,7 +98,7 @@ class QemuRunner: | |||
98 | def handleSIGCHLD(self, signum, frame): | 98 | def handleSIGCHLD(self, signum, frame): |
99 | if self.runqemu and self.runqemu.poll(): | 99 | if self.runqemu and self.runqemu.poll(): |
100 | if self.runqemu.returncode: | 100 | if self.runqemu.returncode: |
101 | self.logger.debug('runqemu exited with code %d' % self.runqemu.returncode) | 101 | self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode) |
102 | self.logger.debug("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout)) | 102 | self.logger.debug("Output from runqemu:\n%s" % self.getOutput(self.runqemu.stdout)) |
103 | self.stop() | 103 | self.stop() |
104 | self._dump_host() | 104 | self._dump_host() |
@@ -208,9 +208,9 @@ class QemuRunner: | |||
208 | if self.runqemu.poll(): | 208 | if self.runqemu.poll(): |
209 | if self.runqemu.returncode: | 209 | if self.runqemu.returncode: |
210 | # No point waiting any longer | 210 | # No point waiting any longer |
211 | self.logger.debug('runqemu exited with code %d' % self.runqemu.returncode) | 211 | self.logger.warning('runqemu exited with code %d' % self.runqemu.returncode) |
212 | self._dump_host() | 212 | self._dump_host() |
213 | self.logger.debug("Output from runqemu:\n%s" % self.getOutput(output)) | 213 | self.logger.warning("Output from runqemu:\n%s" % self.getOutput(output)) |
214 | self.stop() | 214 | self.stop() |
215 | return False | 215 | return False |
216 | time.sleep(0.5) | 216 | time.sleep(0.5) |
@@ -329,14 +329,14 @@ class QemuRunner: | |||
329 | 329 | ||
330 | if not reachedlogin: | 330 | if not reachedlogin: |
331 | if time.time() >= endtime: | 331 | if time.time() >= endtime: |
332 | self.logger.debug("Target didn't reach login banner in %d seconds (%s)" % | 332 | self.logger.warning("Target didn't reach login banner in %d seconds (%s)" % |
333 | (self.boottime, time.strftime("%D %H:%M:%S"))) | 333 | (self.boottime, time.strftime("%D %H:%M:%S"))) |
334 | tail = lambda l: "\n".join(l.splitlines()[-25:]) | 334 | tail = lambda l: "\n".join(l.splitlines()[-25:]) |
335 | bootlog = bootlog.decode("utf-8") | 335 | bootlog = bootlog.decode("utf-8") |
336 | # in case bootlog is empty, use tail qemu log store at self.msg | 336 | # in case bootlog is empty, use tail qemu log store at self.msg |
337 | lines = tail(bootlog if bootlog else self.msg) | 337 | lines = tail(bootlog if bootlog else self.msg) |
338 | self.logger.debug("Last 25 lines of text:\n%s" % lines) | 338 | self.logger.warning("Last 25 lines of text:\n%s" % lines) |
339 | self.logger.debug("Check full boot log: %s" % self.logfile) | 339 | self.logger.warning("Check full boot log: %s" % self.logfile) |
340 | self._dump_host() | 340 | self._dump_host() |
341 | self.stop() | 341 | self.stop() |
342 | return False | 342 | return False |
@@ -356,11 +356,11 @@ class QemuRunner: | |||
356 | else: | 356 | else: |
357 | self.logger.debug("Couldn't configure guest networking") | 357 | self.logger.debug("Couldn't configure guest networking") |
358 | else: | 358 | else: |
359 | self.logger.debug("Couldn't login into serial console" | 359 | self.logger.warning("Couldn't login into serial console" |
360 | " as root using blank password") | 360 | " as root using blank password") |
361 | self.logger.debug("The output:\n%s" % output) | 361 | self.logger.warning("The output:\n%s" % output) |
362 | except: | 362 | except: |
363 | self.logger.debug("Serial console failed while trying to login") | 363 | self.logger.warning("Serial console failed while trying to login") |
364 | return True | 364 | return True |
365 | 365 | ||
366 | def stop(self): | 366 | def stop(self): |
@@ -414,7 +414,7 @@ class QemuRunner: | |||
414 | self.thread.join() | 414 | self.thread.join() |
415 | 415 | ||
416 | def restart(self, qemuparams = None): | 416 | def restart(self, qemuparams = None): |
417 | self.logger.debug("Restarting qemu process") | 417 | self.logger.warning("Restarting qemu process") |
418 | if self.runqemu.poll() is None: | 418 | if self.runqemu.poll() is None: |
419 | self.stop() | 419 | self.stop() |
420 | if self.start(qemuparams): | 420 | if self.start(qemuparams): |