[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
- [Qemu-devel] [RFC 00/24] Avocado-based functional tests, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 02/24] Introduce the basic framework to run Avocado tests, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 03/24] avocado_qemu: Improve handle_prompts to allow login after booted vm, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 04/24] avocado_qemu: Be lenient towards poluted serial console,
Eduardo Habkost <=
- [Qemu-devel] [RFC 05/24] avocado_qemu: Increase the login timeout to 60s, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 06/24] avocado_qemu: Add " " after the default prompt regexp, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 07/24] avocado_qemu: Store "arch" in VM, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 08/24] avocado_qemu: Provide defaults for user and pass, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 09/24] avocado_qemu: Ignore kernel messages on get_console, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 10/24] avocado_qemu: Add support to request image for testing, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 11/24] avocado_qemu: Fix exception name in caller, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 12/24] avocado_qemu: Improve migration error message, Eduardo Habkost, 2018/04/20
- [Qemu-devel] [RFC 13/24] avocado_qemu: Functional test for RHBZ#1431939, Eduardo Habkost, 2018/04/20