Repository navigation
test(scripts): stop fake go stub looping forever - #530
Merged
Merged
Conversation
The source-install fake go shifted through an empty argument list for any subcommand without -o (e.g. go version), spinning at full CPU and surviving as an orphan. It now exits 2, make runs in its own process group under a deadline and is killed on cleanup. Refs: #399 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
Opus review CLEAR at 3653290: orphan reproduced (old stub behind a Makefile calling go env GOFLAGS, make killed with -9, child survived with ppid 1), process-group kill verified on macOS for a hang in a shell function, in a recipe and for a failing test, regression test fails on the old stub, 43 test files with shell stubs scanned with no other unbounded loop, go test ./... and make check-ci exit 0. Lows (go test -timeout shorter than 3 min, second stub copy unguarded, one barrier loop in board_snapshot_test.go) go to #399. Co-Authored-By: Claude Sonnet 5.5 [email protected] |
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.
The fake go stubs in scripts/install_test.go ended in a shift loop that never terminates for any call without -o (99% CPU, orphaned when the test ended: two such processes ran for 18 h). Both stubs now exit 2 when no -o is found; make runs in its own process group with a 3-minute deadline and a group kill on cancel and in cleanup; a regression test fails on the old stub.
Opus review: CLEAR at 3653290. The reviewer reproduced the orphan (old stub behind a Makefile calling go env GOFLAGS, make killed with -9: child survived with ppid 1), verified process-group handling on macOS (hang in a shell function, in a recipe, and a failing test: all killed, nothing left), caught the old-stub mutation, scanned 43 test files with shell stubs and found no other unbounded loop. Lows noted on #399: go test -timeout shorter than 3 min skips cleanups; the second stub copy has no direct guard; one barrier loop in board_snapshot_test.go is unbounded only if the test panics.
Refs: #399
🤖 Generated with Claude Code