mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: drain the replayed serial backlog and stop the pty echo loop
With socket serial output now buffered and replayed on connect, a late-connecting client receives the whole boot backlog. The pty interaction test had three problems with that: - pty_read() slept a second between 512-byte reads and the loop consumed one chunk per two-second tick, far too slow to drain the backlog. Read in larger chunks without the per-read sleep and drain everything available each round; bound the loop so a missing marker can't run to the harness timeout. - it wrote the login keystrokes before reading, so the unread backlog back-pressured the sender and the keystrokes never reached the prompt. Start reading concurrently with typing instead. - the socat pty was created with echo on, so the replayed backlog was echoed back to the guest as serial input, flooding it (UART input overrun, login never completing). Create the pty with echo=0. Signed-off-by: Max Makarov <maxpain@linux.com> Assisted-by: Claude:claude-opus-4-8 [Claude Code]
This commit is contained in:
committed by
Rob Bradford
parent
9889f6d403
commit
7f6df9e870
@@ -2536,7 +2536,7 @@ mod common_parallel {
|
||||
|
||||
let mut socat_command = Command::new("socat");
|
||||
let socat_args = [
|
||||
&format!("pty,link={},raw", serial_socket_pty.display()),
|
||||
&format!("pty,link={},raw,echo=0", serial_socket_pty.display()),
|
||||
&format!("UNIX-CONNECT:{}", serial_socket.display()),
|
||||
];
|
||||
socat_command.args(socat_args);
|
||||
|
||||
Reference in New Issue
Block a user