From: Lukáš Doktor <ldok...@redhat.com> 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 <ldok...@redhat.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- 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