[tbot] [PATCH] tbot: Remove trailing whitespace from login_prompt ("login: ")

Lukasz Majewski lukma at denx.de
Mon Mar 4 23:43:01 UTC 2019

From: lukma <lukma at denx.de>

It may happend that on-board user space SW floods the console to
which tbot is connected.
In this situation the login_prompt read from the channel gets
malformed and the last whitespace char is missing.

In such a situation we would not regard the "login: " as correct

Reduce the probability of this issue by removing the trailing space
- tbot would only look for "login:" for prompt login match.

Signed-off-by: lukma <lukma at denx.de>
 tbot/machine/board/linux.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tbot/machine/board/linux.py b/tbot/machine/board/linux.py
index 0685700..246e262 100644
--- a/tbot/machine/board/linux.py
+++ b/tbot/machine/board/linux.py
@@ -27,7 +27,7 @@ Self = typing.TypeVar("Self", bound="LinuxMachine")
 class LinuxMachine(linux.LinuxMachine, board.BoardMachine[B]):
     """Abstract base class for board linux machines."""
-    login_prompt = "login: "
+    login_prompt = "login:"
     """Prompt that indicates tbot should send the username."""

More information about the tbot mailing list