Skip to content

flake test: terminal_exec_no_console_socket #3950

Backlog

Description

@saku3

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.

ref: #3930 (comment)

I've encountered this error multiple times, not just in the case mentioned above.

Activity

  1. ARMeeru commented on Nov 29, 2026

    @ARMeeru
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions