-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
test: prefer system pgrep/pkill to avoid proctools conflict #21245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR resolves a conflict between Homebrew's brew test command and the proctools package. When proctools is installed, it provides incompatible pgrep and pkill binaries in HOMEBREW_PREFIX/bin that cause test cleanup to fail with SIGTERM. The fix ensures that system-provided binaries are used instead by modifying the PATH environment variable during cleanup.
Key Changes
- Modified process cleanup logic in the
ensureblock to prepend/usr/bin:/binto PATH - Used
/usr/bin/envto invokepgrepandpkillcommands with the modified PATH - Removed the
which()checks before invoking commands (now relying onsystem()return value)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When `proctools` is installed, `brew test` fails with a SIGTERM during cleanup. This happens because `proctools` provides `pgrep`/`pkill` binaries in `HOMEBREW_PREFIX/bin`, which behave differently than system binaries on macOS. This fix forces the use of system binaries in `/usr/bin` within the `system` call. Fixes Homebrew#21242
8346e33 to
14cd731
Compare
|
So I can really rely on I followed your propose and use absolute paths. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
b7bc5a7 to
e6396bd
Compare
When
proctoolsis installed,brew testfails with a SIGTERM during cleanup. This happens becauseproctoolsprovidespgrep/pkillbinaries inHOMEBREW_PREFIX/bin, which behave differently than system binaries on macOS.This fix forces the use of system binaries by prepending/usr/binand/bintoPATHwithin thesystemcall. It invokes commands via/usr/bin/envto bypass Ruby's internal command resolution, ensuring the modifiedPATHis respected during lookup.This fix forces the use of system binaries in
/usr/binwithin thesystemcall.Fixes #21242
brew lgtm(style, typechecking and tests) with your changes locally?