Repository navigation
test: wait for exec and readiness in containment and browser cleanup tests - #304
Merged
Merged
Conversation
… race The supervisor reap race test waited a fixed 50 ms for the stubborn-stall fake Chrome to install its signal handlers. The fake wrote chrome.pid before it installed them. Under load, a probe at the 50 ms point found the handlers missing in 1 of 10 runs, so a signal could reach the fake before the handlers existed. The fake now installs its handlers before it writes chrome.pid. The test waits until chrome.pid holds the child pid instead of a fixed delay. Closes #297
The product waits 1 s for the supervisor identity, which the mock never returns, and then kills the group. On a starved host that window closed before the supervisor had spawned fake Chrome, so chrome.pid never appeared and the test never covered a live leftover Chrome. The mocked startDaemon now returns the Chrome handle only after chrome.pid exists or the supervisor exits. The identity window then always opens with a live Chrome in the group. Closes #260
spawn can return while execve is still running. Until the kernel sets env_end, /proc/<pid>/environ reads as empty. Under load, that window reached destroy's first membership proof. In the recycled-pid test the cleanup retried the mid-exec member. That moved the test's procsReads === 3 trigger into the pre-freeze proof, so the frozen proof saw the replacement token and refused it as foreign instead of as a recycled pid. In the proven-member test the exec finished between the environ read and the stat read, so the member was refused as foreign and the scope was not removed. The spawn helpers now block until the new image shows the PATH that spawn gave it. The refusals stay as they were. Closes #292
…browser-test-flakes
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.
Three core and browser test flakes fixed in test code only.
#292:
spawncan return whileexecveis still running, and until then/proc/<pid>/environreads as empty. Under load this window reached the containment cleanup's first membership proof. In the recycled-pid test, that moved the test's trigger into the proof before the freeze, so the refusal reason changed. In the proven-member test, the exec finished between two reads. The simulated members now start only after/proc/<pid>/environshows their environment. No assertion or refusal changed. The second case also exposed a product false refusal, filed as #299. A comment atwaitForExecstates that the test excludes that transition and names #299.#297: the stubborn-stall fake Chrome wrote
chrome.pidbefore it installed its signal handlers, and the test waited a fixed 50 ms. The fake now installs its handlers first, and the test waits for the pid marker. Its CDP timeout now covers the fake's startup, because the test ends startup itself by killing the leader.#260: the pre-identity cleanup test needs a live Chrome in the group when the product's 1 s identity window closes. Under load, Chrome had not started yet. The mocked
startDaemonnow returns the Chrome handle only afterchrome.pidexists, with a 20 s bound, so the test always exercises a live leftover Chrome.Closes #260
Closes #292
Closes #297
env_end0 and empty environ on the first proof; forced mid-exec on the first proof~/Artifacts/pickforge-batch3-2026-10-08/worker-D-report.mdworker-D-report.mdworker-D-pf-flakesworker-D-pf-flakesworker-D-pf-flakesworker-D-report.md~/Artifacts/pickforge-batch3-2026-10-08/260-292-297-core-browser-test-flakes-cov.logQA device pass: skipped. The change is test code only, so there is nothing to drive.