Repository navigation
test(cli): verify PTY foreground handoffs - #150
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The PTY shell fixture in
test/cli/run/no-orphans.test.tscomparedtcsetpgrpwith zero. Perl POSIX returnsundefon failure, and numeric comparison treated that as zero, allowing a failed handoff to proceed without establishing foreground ownership.Use one helper for both the initial handoff and resume: reject undefined syscall results, then require
tcgetpgrpto match the requested process group before continuing. This follows up on #145. The change is limited to the fixture; runtime code, assertions, timeouts and existing platform gates are unchanged.Validation
a3cbe02065dc05048fef25541f2a6a9a54350315. Its build commit364c8d4c54a867190ac2d6ab445e4878126ffb18has the identical complete source tree. All 14 selected Linux files and 10 selected macOS files passed. The full corrected file recorded exit code 0 and no signal on both platforms: Linux 18 pass / 6 existing skips / 0 fail in 2.105 seconds; macOS 15 pass / 9 existing skips / 0 fail in 1.370 seconds, each across all 24 cases. No CI rerun was requested.An earlier one-shot Linux validation produced an exact 24-case JUnit report (18 pass / 6 existing skips), including the corrected PTY case, and all 92 captured source/lock files matched their expected hashes. Its Node reporting wrapper then exited 1 because the supplied source archive lacked Git metadata for report links. Bun's exit code and signal were not recorded, so successful teardown under that run's extra local-mode VM-destruction setting remains unverified. That failed run is preserved and was not replayed. The new-head CI results above establish successful full-file exits under the normal CI environment; they do not reconstruct the earlier missing result.
Upstream search found no matching correction for this Perl return-value check; the related terminal-signal and macOS descendant-tracking changes address separate behavior.