Commit 4b78112
committed
fix(console): skip extra newline after username in login_stage_2()
The login loop in SSHConsoleConn.login_stage_2() sends an unconditional
write_channel(RETURN) at the bottom of every iteration. After the username
is sent and user_sent is set to True, the loop falls through to this
write_channel, sending a blank newline to the DUT before the Password:
prompt is read.
The DUT receives the blank newline as the password input, causing
authentication to fail. Linux pam_faildelay then enforces a 3-second
delay before responding with Login incorrect. The test framework times
out within this 3-second window, closes the connection, and retries -
all three attempts fail the same way.
Fix: add continue after user_sent = True so the loop restarts at the
top and waits for the Password: prompt before taking any further action.
Root cause confirmed via live manual test on bjw-can-7060-1:
- Sending empty Enter at Password: prompt -> 3-second silence -> Login incorrect
- Normal login with correct password succeeds in under 1 second
- Pass rate of dut_console/test_escape_character.py was 2.6% due to this race1 parent 258a8fd commit 4b78112
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
0 commit comments