Problem
The regression test added for the pty raw-mode fix (apple/container#1148) validates the pre-existing Terminal.setraw() recipe at the ContainerizationOS level, but never exercises the changed production code path vminitd/Sources/vmexec/Console.swift configureStdIO(). A regression in the production wiring (e.g. removal of the setraw() call) would pass the macOS test suite.
Why it matters
Console.configureStdIO() is Linux-only (the vmexec executable target in the vminitd package) and the vminitd package declares zero test targets today. The 1024-byte stdout truncation it fixes is Linux-kernel tty behavior that macOS openpty cannot reproduce, so the truncation regression is unguarded by automation.
Suggested fix
Add a Linux-target test (or CI step) that runs Console.configureStdIO() on a pty pair and writes >1024 bytes through the slave, asserting full delivery on the master. Keep the macOS termios-flag assertions as fast recipe-level coverage.
Evidence
vminitd/Sources/vmexec/Console.swift:63: try Terminal(descriptor: slaveFD, setInitState: false).setraw()
Tests/ContainerizationOSTests/TerminalRawModeTests.swift:63: try child.setraw()
vminitd/Package.swift declares no testTarget for vmexec
Source
Branch fix/pty-raw-mode-interactive-stdout at head 9ed4b36 in apple/containerization (worktree).
Metadata
Severity: P2
Confidence: 100
Reviewer(s): correctness, testing
Finding ID: vminitdsourcesvmexecconsole.swift63-regressiontestdoesnotexercisetheproductioncodepathconsoleconfigurestdioitismeanttoprotect
Problem
The regression test added for the pty raw-mode fix (apple/container#1148) validates the pre-existing
Terminal.setraw()recipe at the ContainerizationOS level, but never exercises the changed production code pathvminitd/Sources/vmexec/Console.swiftconfigureStdIO(). A regression in the production wiring (e.g. removal of the setraw() call) would pass the macOS test suite.Why it matters
Console.configureStdIO()is Linux-only (thevmexecexecutable target in thevminitdpackage) and thevminitdpackage declares zero test targets today. The 1024-byte stdout truncation it fixes is Linux-kernel tty behavior that macOSopenptycannot reproduce, so the truncation regression is unguarded by automation.Suggested fix
Add a Linux-target test (or CI step) that runs
Console.configureStdIO()on a pty pair and writes >1024 bytes through the slave, asserting full delivery on the master. Keep the macOS termios-flag assertions as fast recipe-level coverage.Evidence
vminitd/Sources/vmexec/Console.swift:63: try Terminal(descriptor: slaveFD, setInitState: false).setraw()Tests/ContainerizationOSTests/TerminalRawModeTests.swift:63: try child.setraw()vminitd/Package.swiftdeclares no testTarget for vmexecSource
Branch
fix/pty-raw-mode-interactive-stdoutat head9ed4b36in apple/containerization (worktree).Metadata
Severity: P2
Confidence: 100
Reviewer(s): correctness, testing
Finding ID: vminitdsourcesvmexecconsole.swift63-regressiontestdoesnotexercisetheproductioncodepathconsoleconfigurestdioitismeanttoprotect