Refactor SOS test harness Helix integration - #6019
Conversation
Stage the SOS.Tests payload from the test project, submit one work item per platform through a generic Helix dispatcher, centralize payload paths in RepoLayout, and add dedicated pipeline wiring. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
c349a1c to
fe67a4b
Compare
Move SOS.Tests execution to dedicated Helix jobs with a trimmed, disk-backed payload while preserving existing debuggee coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Generate build, test, and SOS Helix display names from job properties so GitHub checks clearly identify each job type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Use fixed host-slot pools for dump analysis: two slots each for CDB and LLDB, and one for dotnet-dump. Keep in-process DbgEng capture on its separate exclusive slot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Use the canonical plist boolean syntax accepted by the macOS codesign entitlement parser. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Recognize the known Linux x64 and arm64 PR_SET_PTRACER race in .NET 8 and 9, and link to the runtime fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Keep Debug test coverage for pull requests while reserving the duplicate Release test matrix for non-PR builds. Dedicated Release SOS Helix jobs remain enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Run Debug build, test, and SOS Helix jobs for pull requests, and use Release consistently for non-PR validation. Add the matching Windows x86 Debug artifact required by the PR SOS leg. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
|
For mac, you may want to consider |
Stage the matching DAC beside single-file debuggees so Linux and macOS can honor Heap dump requests instead of silently producing Full dumps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Disable LLDB external symbol lookup before opening targets and keep Unix Core object tests on Heap dumps instead of using an unsubstantiated Full-dump workaround. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Use two analyzer slots based on the measured capacity comparison and remove the obsolete idle busy-wait rationale. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Skip the narrow Unix legacy-DAC Heap configurations where dumpobj crashes while probing missing ComWrappers metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Pull request overview
This PR wires up SOS.Tests for Helix execution by staging a self-contained payload, updating the SOS harness to run from that staged layout, and refining the test matrix/host behavior for improved reliability and determinism across platforms.
Changes:
- Add Helix payload staging + launch scripts and a generic Helix dispatcher project, and connect
SOS.Teststo stage/send to Helix. - Update SOS harness layout discovery and tool/runtime resolution to support running from a staged payload root (Helix).
- Refine dump/session pooling and test-matrix gating (including a targeted
dumpobjskip for a known .NET 10 legacy DAC issue) and disable LLDB external symbol lookup.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/dirs.proj | Stops SOS.Tests from executing in the normal test build while still building it for payload staging. |
| src/tests/SOSHarnessDebuggees.props | Centralizes debuggee catalog + metadata to drive publishing and payload contents. |
| src/tests/SOS.UnitTests/SOSRunner.cs | Disables LLDB external symbol lookup for more deterministic startup. |
| src/tests/SOS.Tests/TestMatrixCapabilityTests.cs | Adds coverage for the new dumpobj capability gating behavior. |
| src/tests/SOS.Tests/TestMatrices.cs | Introduces SupportsDumpObj/skip helper and simplifies core/framework config generation. |
| src/tests/SOS.Tests/TestConfigValidityTests.cs | Expands createdump known-failure coverage + adds tests for new dump-type helpers. |
| src/tests/SOS.Tests/SosReplayAttribute.cs | Moves replay output under a dedicated replay directory and records trace file path via RepoLayout. |
| src/tests/SOS.Tests/SOS.Tests.csproj | Removes official-build skip and imports Helix payload targets. |
| src/tests/SOS.Tests/README.md | Documents Helix behavior, DAC staging for single-file, and LLDB external lookup disablement. |
| src/tests/SOS.Tests/ObjectInspectionTests.cs | Switches to new matrices and adds dumpobj unsupported skip. |
| src/tests/SOS.Tests/ObjectGcHelperTests.cs | Switches to new matrices and adds dumpobj unsupported skip. |
| src/tests/SOS.Tests/ObjectFieldsTests.cs | Switches to new matrices and adds dumpobj unsupported skip. |
| src/tests/SOS.Tests/HostSlotTests.cs | Updates tests for new pooled-slot behavior (two-slot pools). |
| src/tests/SOS.Tests/HelixPayload.targets | Adds MSBuild logic to stage a Helix payload and submit it through the Helix dispatcher. |
| src/tests/SOS.Tests/Helix/run-sos-tests.sh | Adds Linux/macOS Helix work item launcher with LLDB setup and reporting. |
| src/tests/SOS.Tests/Helix/run-sos-tests.cmd | Adds Windows Helix work item launcher with signature-check setup and reporting. |
| src/tests/SOS.Tests/Helix/debuggee-entitlements.plist | Adds macOS entitlements required to run/signal debuggees under Helix. |
| src/tests/SOS.Tests/DumpSigTests.cs | Switches to new matrices and adds dumpobj unsupported skip. |
| src/tests/SOS.Tests/DumpArrayTests.cs | Switches to new matrices and adds dumpobj unsupported skip. |
| src/tests/SOS.TestHarness/ToolPaths.cs | Updates debugger/DAC/tool discovery for staged payloads and Helix runtime layout. |
| src/tests/SOS.TestHarness/TestConfig.cs | Updates single-file dump assumptions and refines dump-kind filtering. |
| src/tests/SOS.TestHarness/Targets.cs | Closes all pooled host slots instead of single instances. |
| src/tests/SOS.TestHarness/SnapshotStore.cs | Adds DAC staging for single-file on Unix, refines dump type mapping, and enforces “use prebuilt on Helix”. |
| src/tests/SOS.TestHarness/SOS.TestHarness.csproj | Embeds configured runtime versions into harness assembly metadata. |
| src/tests/SOS.TestHarness/RepoLayout.cs | Adds staged-payload root discovery, upload/replay/crashdump paths, and Helix dotnet root logic. |
| src/tests/SOS.TestHarness/LldbHostBase.cs | Disables LLDB external lookup and updates trace path plumbing. |
| src/tests/SOS.TestHarness/HostSlot.cs | Introduces HostSlotPool and expands dump-host pooling to bounded concurrency. |
| src/tests/SOS.TestHarness/HostDiagnostics.cs | Moves crash dump directory under RepoLayout upload root. |
| src/tests/SOS.TestHarness/DumpSession.cs | Distributes dump sessions across slot pools (incl. cdb) for bounded concurrency/memory. |
| src/tests/SOS.TestHarness/DbgEngCapturer.cs | Uses the renamed dbgeng capture slot. |
| src/tests/SOS.TestHarness/CoreVersions.cs | Switches to runtime versions embedded from build configuration metadata (no manifest fallback). |
| src/tests/Debuggees.proj | Uses the centralized debuggee catalog + metadata to drive publish lists. |
| global.json | Adds Microsoft.DotNet.Helix.Sdk MSBuild SDK for Helix submission project. |
| eng/pipelines/sos-helix.yml | Adds a job template that builds payload and submits SOS.Tests execution to Helix. |
| eng/pipelines/helix-platforms.yml | Defines Helix queue variables for SOS Helix jobs. |
| eng/pipelines/build.yml | Adjusts display names and dependency wiring for build/test legs. |
| eng/helix/SendToHelix.proj | Adds a generic Helix submission project that enforces single-work-item dispatch and zips payload to disk. |
| diagnostics.yml | Integrates SOS Helix jobs, adds PR-vs-non-PR validation configuration selection, and adjusts build/test leg matrices. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Combining Mac x64 build and arm64 build along with arm64 test into one machine is something to consider. Grabbing any mac off the hosted pool can be a wait fest. |
Disable system core dumps from intentionally crashing debuggees and limit macOS execution to two threads to reduce dump capture pressure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Capture the process table and relevant lsof output when redirected output fails to close on macOS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Capture process and descriptor state before Linux process-group cleanup so it can be compared with the macOS drain timeout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Skip Unix dump tests for .NET 8 and 9 single-file runtimes, whose createdump callback children do not exit. Restore direct process launching now that the unsupported runtime configurations are excluded. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Summary
This is based on and supersedes the implementation approach in #6018.
Validation