qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 04/24] avocado_qemu: Be lenient towards poluted serial


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC 04/24] avocado_qemu: Be lenient towards poluted serial console
Date: Fri, 20 Apr 2018 15:19:31 -0300

From: Lukáš Doktor <address@hidden>

The serial console is frequently spammed kernel messages, let's not be
so strict and match lines also containing other parts.

There is still possibility of failure in case kernel injects message on
a new line after the expected output producing non-matching last_line.
Anyway checking for any-line would be a bit too prone to false-positives
so let's just go with this at this point.

Signed-off-by: Lukáš Doktor <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
 tests/avocado/avocado_qemu/test.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/avocado/avocado_qemu/test.py 
b/tests/avocado/avocado_qemu/test.py
index 9cc163b3a8..fb16785a20 100644
--- a/tests/avocado/avocado_qemu/test.py
+++ b/tests/avocado/avocado_qemu/test.py
@@ -131,9 +131,9 @@ def _handle_prompts(session, username, password, prompt, 
timeout=10,
             match, text = session.read_until_last_line_matches(
                 [r"[Aa]re you sure", r"[Pp]assword:\s*",
                  # Prompt of rescue mode for Red Hat.
-                 r"\(or (press|type) Control-D to continue\):\s*$",
-                 r"[Gg]ive.*[Ll]ogin:\s*$",  # Prompt of rescue mode for SUSE.
-                 r"(?<![Ll]ast )[Ll]ogin:\s*$",  # Don't match "Last Login:"
+                 r"\(or (press|type) Control-D to continue\):\s*",
+                 r"[Gg]ive.*[Ll]ogin:\s*",  # Prompt of rescue mode for SUSE.
+                 r"(?<![Ll]ast )[Ll]ogin:\s*",  # Don't match "Last Login:"
                  r"[Cc]onnection.*closed", r"[Cc]onnection.*refused",
                  r"[Pp]lease wait", r"[Ww]arning", r"[Ee]nter.*username",
                  r"[Ee]nter.*password", r"[Cc]onnection timed out", prompt,
-- 
2.14.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]