Skip to content

Fix vmexec PTY output truncation on Linux - #900

Open
Hokila wants to merge 1 commit into
apple:mainfrom
Hokila:oci-reference-regression
Open

Fix vmexec PTY output truncation on Linux#900
Hokila wants to merge 1 commit into
apple:mainfrom
Hokila:oci-reference-regression

Conversation

@Hokila

@Hokila Hokila commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Fixes #844.

When vmexec configures standard I/O through a pseudo-terminal, the slave terminal was left in cooked mode, which could truncate or otherwise alter larger output streams. This change configures the slave PTY in raw mode before attaching it to stdin/stdout/stderr.

Changes

  • Configure the PTY slave with Terminal.setraw() in Console.configureStdIO().
  • Add the vmexecTests test target.
  • Add a Linux regression test that writes and verifies 4096 bytes through Console.configureStdIO().
  • Keep the test compatible with Swift 6.3 Linux builds.

Validation

  • make linux-test
    • 656 tests passed across 86 suites.
  • Focused vmexecTests
    • 1 test passed.
  • Swift formatting, license, and whitespace checks passed.

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.

Add a test target covering vmexec Console.configureStdIO

1 participant