qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org, Eduardo Habkost <ehabkost@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	qemu-arm@nongnu.org,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: [Qemu-devel] [PATCH v2 1/2] BootLinuxConsoleTest: Do not log empty lines
Date: Fri,  7 Jun 2019 00:55:20 +0200	[thread overview]
Message-ID: <20190606225521.9187-2-philmd@redhat.com> (raw)
In-Reply-To: <20190606225521.9187-1-philmd@redhat.com>

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Avoid to log empty lines in console debug logs.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Tested-by: Cleber Rosa <crosa@redhat.com>
Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
v2: no change
---
 tests/acceptance/boot_linux_console.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index d5c500ea30..f593f3858e 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -37,8 +37,10 @@ class BootLinuxConsole(Test):
         console = self.vm.console_socket.makefile()
         console_logger = logging.getLogger('console')
         while True:
-            msg = console.readline()
-            console_logger.debug(msg.strip())
+            msg = console.readline().strip()
+            if not msg:
+                continue
+            console_logger.debug(msg)
             if success_message in msg:
                 break
             if failure_message in msg:
-- 
2.20.1



  reply	other threads:[~2019-06-06 23:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 22:55 [Qemu-devel] [PATCH v2 0/2] tests: Avocado-test for the SmartFusion2 board Philippe Mathieu-Daudé
2019-06-06 22:55 ` Philippe Mathieu-Daudé [this message]
2019-06-06 22:55 ` [Qemu-devel] [PATCH v2 2/2] BootLinuxConsoleTest: Test " Philippe Mathieu-Daudé
2019-06-06 23:13   ` Cleber Rosa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190606225521.9187-2-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=amarkovic@wavecomp.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sundeep.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).