test(runtime): isolate process-global fixtures from parallel tests - #9767
test(runtime): isolate process-global fixtures from parallel tests#9767proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughRuntime test fixtures that inspect process-global state now run in isolated child processes. The box reuse test uses exact allocation accounting and a tighter residue bound. A changelog entry documents the fix. ChangesRuntime Fixture Isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change isolates process-global runtime fixtures in child processes and tightens their assertions, reducing parallel-test flakiness without changing runtime product behavior. No current merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant TestRunner
participant isolated_test
participant ChildTestProcess
TestRunner->>isolated_test: invoke process-global fixture
isolated_test->>ChildTestProcess: launch exact test with isolation marker
ChildTestProcess->>ChildTestProcess: run isolated fixture body
ChildTestProcess-->>isolated_test: print completion marker and exit
isolated_test-->>TestRunner: verify successful completion
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed on |
The three tests in #9197 inspect process-global state while sibling tests can change it. The Linux loader race is concrete:
rejects_an_unreadable_loaded_shared_objectunlinks a loaded library while the discovery test enumerates loaded images; box allocation counters and the composed symbol-cache epoch are also shared.Run the three reported fixtures and the loader’s destructive sibling in separate test processes. The helper selects the current libtest name and requires successful completion of the original body, so stale filters, child panics, or early exits cannot silently pass. All original behavior assertions remain; the box fixture now requires the exact allocation count and one turn’s residue bound instead of allowing slack for neighboring tests.
Validation:
pre-tag-check.sh --quickand diff checks pass.PERRY_CONCAT_SITE_CACHEcache-registry failure (fixed separately in fix(cache): register concat switch and explain codegen inputs #9748). The runner stops at that unrelated failure.The full runtime suite still uses its existing single-threaded policy; this change isolates these specific fixtures. Linux validation includes the existing pthread-attribute prerequisite from #9752, which is not part of this diff.
Test-only change; no version bump.
Closes #9197.
Summary by CodeRabbit