You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validate failure is terminal_exec_no_console_socket under runc: the container printed TTY, but the line arrived as TTY\r\r\n, so the exact match missed it.
str::lines strips only one \r from a line ending, so when a line arrives as TTY\r\r\n, saw_line compares TTY\r with TTY and misses it. terminal_newline_rendering failed the same way on #3943: its CRLF check passed (0 of 4 LF bytes were not preceded by CR), and only saw_line(&output, "third") missed on third\r.
The extra CR comes from a second \n to \r\n translation: the line passes through the container's pty and then the test's pty, and each one adds a CR while its output processing is on. runc switches both off in recvtty (tty.go), but it puts the test pty into raw mode only after its copy goroutine has started, so the result depends on timing. I couldn't reproduce it locally (800 runs of run and exec -t on runc and youki all gave TTY\r\n).
Having saw_line ignore trailing CRs (line.trim_end_matches('\r') == marker) covers every terminal test that uses it. A unit test fails on TTY\r\r\n today and passes with that change. I can send the PR if that works for you.
Activity
ARMeeru commentedon Nov 29, 2026
str::linesstrips only one\rfrom a line ending, so when a line arrives asTTY\r\r\n,saw_linecomparesTTY\rwithTTYand misses it. terminal_newline_rendering failed the same way on #3943: its CRLF check passed (0 of 4 LF bytes were not preceded by CR), and onlysaw_line(&output, "third")missed onthird\r.The extra CR comes from a second
\nto\r\ntranslation: the line passes through the container's pty and then the test's pty, and each one adds a CR while its output processing is on. runc switches both off inrecvtty(tty.go), but it puts the test pty into raw mode only after its copy goroutine has started, so the result depends on timing. I couldn't reproduce it locally (800 runs ofrunandexec -ton runc and youki all gaveTTY\r\n).Having
saw_lineignore trailing CRs (line.trim_end_matches('\r') == marker) covers every terminal test that uses it. A unit test fails onTTY\r\r\ntoday and passes with that change. I can send the PR if that works for you.