From f8bd2af0c6afb2e941176e2535531289a2403f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=A6=8D=E5=84=BF=20=E2=9C=A8?= <258399167+xiaoyaner0201@users.noreply.github.com> Date: Sat, 21 Nov 2026 22:15:50 +0800 Subject: [PATCH] test(agent): enlarge raw PTY input payload to exceed larger PTY buffers --- tests/test_agent_terminal_input.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_agent_terminal_input.py b/tests/test_agent_terminal_input.py index 10cc89344..5f80ab322 100644 --- a/tests/test_agent_terminal_input.py +++ b/tests/test_agent_terminal_input.py @@ -128,7 +128,8 @@ async def test_large_raw_pty_input_retries_short_writes_without_losing_tail( """ control_read, control_write = os.pipe() os.set_inheritable(control_read, True) - text = "0123456789abcdef" * 4096 + # 256 KiB 足以填满 Linux 与 gVisor 等常见实现的 PTY 输入缓冲,确保触发真实短写与回压。 + text = "0123456789abcdef" * 16384 data = text.encode() loop = asyncio.get_running_loop() blocked = asyncio.Event()