Repository navigation
test(remote-control): deterministic child pid in the real-tmux ownership test - #133
Merged
Merged
Conversation
…child The real-tmux ownership test typed `sleep 30` into an interactive login shell and took the first `pgrep -P` hit as its child. On Ubuntu runners the shell's startup files fork short-lived helpers (lesspipe, dircolors, locale checks), and procps pgrep lists those mid-fork subshells and zombies, so the test sometimes picked a helper that had exited before `_pane_owns_pid` ran `ps`, which correctly reported it as not owned. The pane now runs a fixed `sleep 30 & wait` command and the test matches the child by name with `pgrep -x`, so it always checks the live process it started. Claude-Session: https://claude.ai/code/session_019dHRodCxwuwTvnKtUNrUU7
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.
Problem
test_pane_ownership_against_real_tmuxfailed on the ubuntu 3.10 leg three times today (#115, #116, #117), always at the child assertion with a fresh pid, while the pane-pid assertion passed. Test bug, not a service bug.Changes
sleep 30into an interactive login shell and took the firstpgrep -P <pane_pid>hit as the child. On Ubuntu runners bash startup forks short-lived helpers (lesspipe, dircolors, locale checks); procpspgreplists those mid-fork, so the test sometimes grabbed a helper that was gone by the time_pane_owns_pidranps -o ppid=. The service correctly returned False for a dead pid.sleep 30 & waitinstead of a login shell plus send-keys, and the child is matched withpgrep -x -P <pane_pid> sleep, so the test checks the live process it started. No service change; refusing a dead pid is the intended behaviour.Verification
pgrepshim: 37 of 40 runs failed at the same line. Control without forking startup files: 10/10 pass. Plain macOS never failed (itspgrep -Pskips mid-fork children).yeson 10 cores. Whole file 40 passed, ruff clean.Follow-ups
None.
https://claude.ai/code/session_019dHRodCxwuwTvnKtUNrUU7