Skip to content

Add new SOS test harness - #5979

Draft
max-charlamb wants to merge 9 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/sos-testing
Draft

Add new SOS test harness#5979
max-charlamb wants to merge 9 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/sos-testing

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • add a consolidated, cross-host SOS test harness covering CDB, dotnet-dump, and LLDB
  • exercise dump and live targets across runtime versions, deployment flavors, and DAC modes
  • isolate dbgeng and dump capture in helper processes with replay artifacts for failures
  • disable W^X for live EngineHost debuggees so bpmd can patch JIT code safely
  • restore Unix executable permissions after pipeline artifact transfer for the MTP runner and debuggee apphosts

This branch is based on Lee Culver's leculver/sos-testing work and is opened as a draft to inspect and review the complete diff.

Validation

  • dotnet build src\tests\SOS.Tests\SOS.Tests.csproj --no-restore --configuration Debug
  • SOS.Tests.exe --filter-method SOS.Tests.GcWhereTests.GcWhere_Moves --parallel none: 24 passed

Follow-up

  • prebuild SingleFile debuggees for CI instead of publishing them during test execution

@max-charlamb max-charlamb changed the title Add cross-host SOS test harness Add new SOS test harness Aug 25, 2026
leculver and others added 7 commits August 25, 2026 16:54
Add a marker-driven scenario process that exposes managed stacks, heap shapes, exceptions, delegates, synchronization state, and crash points for SOS command validation across runtime versions and deployment modes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Add reusable target acquisition, dump capture, debugger-host abstractions, matrix configuration, SOS output parsing, replay diagnostics, and source generation for marker constants used by command tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Run dbgeng command execution and dump capture in helper processes so debugger failures remain isolated from the xUnit test host and architecture-specific binaries are resolved correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Add xUnit v3 command coverage for stacks, threads, heaps, objects, modules, runtime state, and diagnostic commands across supported hosts, deployment flavors, dump kinds, GC modes, runtimes, and DAC implementations. Include failure replay output and a local execution runbook.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Include the harness library, source generator, debugger helper hosts, and SOS.Tests project in build.sln for IDE discovery and repository builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2bba76c7-c3b4-4774-84d5-6d21347e8ef8
Disable W^X for live debuggees so bpmd can patch JIT code without triggering access violations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d5c60f7-9c89-42e6-b9fc-04ef78c8f8d8
Pipeline artifact transfer drops executable bits. Restore them before running the MTP test apphost or launching debuggee apphosts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d5c60f7-9c89-42e6-b9fc-04ef78c8f8d8
@max-charlamb
max-charlamb force-pushed the max-charlamb/sos-testing branch from 9041f9b to 620c347 Compare August 25, 2026 20:59
Max Charlamb and others added 2 commits August 25, 2026 17:13
Use Arcade's TestToRun command path directly because UseAppHost metadata is not populated for the MTP executable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2d5c60f7-9c89-42e6-b9fc-04ef78c8f8d8
Publish version-matched single-file debuggees during the build and make the test harness consume the transferred immutable outputs instead of invoking dotnet publish during tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 886d87aa-631a-49cd-a973-aacd17a1df81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants