Skip to content

test(console): make test_pty_console_full deterministic - #549

Merged
Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-pwupwtzsnvru
Nov 11, 2026
Merged

Lencerf merged 1 commit into
google:mainfrom
Lencerf:push-pwupwtzsnvru

Conversation

@Lencerf

@Lencerf Lencerf commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator

On Linux, a kworker moves the output written to a PTY master into the line discipline asynchronously. After the test filled the PTY until EAGAIN, the kworker could still free some space, so the next console write could succeed without discarding the unread output, and the test timed out waiting for the newest output.

Write all of the output at once instead. The PTY cannot take all of it, so the last write always finds the buffer full.

Fixes: 0b7e974 ("feat(console): redirect the guest console to a PTY")

On Linux, a kworker moves the output written to a PTY master into the
line discipline asynchronously. After the test filled the PTY until
EAGAIN, the kworker could still free some space, so the next console
write could succeed without discarding the unread output, and the test
timed out waiting for the newest output.

Write all of the output at once instead. The PTY cannot take all of it,
so the last write always finds the buffer full.

Fixes: 0b7e974 ("feat(console): redirect the guest console to a PTY")
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 43105947891

Coverage decreased (-0.005%) to 44.037%

Details

  • Coverage decreased (-0.005%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16547
Covered Lines: 7075
Line Coverage: 42.76%
Relevant Branches: 1774
Covered Branches: 993
Branch Coverage: 55.98%
Branches in Coverage %: Yes
Coverage Strength: 900.44 hits per line

💛 - Coveralls

@Lencerf
Lencerf added this pull request to the merge queue Nov 11, 2026
Merged via the queue into google:main with commit 5b798ce Nov 11, 2026
20 checks passed
@Lencerf
Lencerf deleted the push-pwupwtzsnvru branch November 11, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants