[cDAC] Add infrastructure to run cDAC tests using CLRMD and dumps on Helix reusing runtime builds#124656
Draft
max-charlamb wants to merge 35 commits intodotnet:mainfrom
Draft
[cDAC] Add infrastructure to run cDAC tests using CLRMD and dumps on Helix reusing runtime builds#124656max-charlamb wants to merge 35 commits intodotnet:mainfrom
max-charlamb wants to merge 35 commits intodotnet:mainfrom
Conversation
The artifactFileName used $(archiveExtension) which resolves to the downloading platform's archive format (.zip on Windows, .tar.gz on Linux). When downloading cross-platform dumps, this produces the wrong filename — e.g., a Linux agent looks for CdacDumps_windows_x64.tar.gz but the artifact was uploaded from Windows as CdacDumps_windows_x64.zip. Hardcode the correct extension for each platform's artifact so the ExtractFiles glob matches regardless of which platform downloads it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The dump artifacts are consumed cross-platform, but the upload used the platform-specific archive format (zip on Windows, tar.gz on Linux). This caused the Linux agent to fail extracting Windows .zip artifacts because unzip is not installed on the build image. Force tar.gz for all dump artifact uploads so both platforms can extract them without additional tooling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s which does not exist on all platforms
The send-to-helix-inner-step.yml template call was missing the _Creator environment variable, causing 'Creator is required when using anonymous access' errors on .Open Helix queues. All other Helix jobs in the repo pass _Creator: dotnet-bot through the environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request introduces a comprehensive infrastructure for running cDAC (Diagnostic Data Contract) dump-based integration tests using CLRMD on Helix. The infrastructure enables testing cDAC contracts against real crash dumps from both locally-built runtimes and released .NET versions, while reusing existing runtime builds from CI to minimize build times.
Changes:
- Adds a new DumpTests project with integration tests for all major cDAC contracts (Thread, StackWalk, GC, Object, Loader, Exception, EcmaMetadata, RuntimeInfo, RuntimeTypeSystem)
- Creates 7 debuggee applications that crash intentionally to produce dumps with known states for testing
- Implements Helix integration to run dump generation and tests on real hardware across Windows, Linux, and macOS (x64/arm64)
- Adds PowerShell scripts for local testing and CI dump archive support
- Updates build infrastructure to support the new test subset (
tools.cdacdumptests)
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/native/managed/cdac/tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj |
Excludes DumpTests directory from main test project |
src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj |
Main DumpTests project file with Helix payload preparation target |
src/native/managed/cdac/tests/DumpTests/DumpTests.targets |
MSBuild targets for building debuggees and generating crash dumps |
src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs |
Base class providing dump loading, cDAC target creation, and conditional test skipping |
src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs |
CLRMD wrapper for reading dump memory and locating contract descriptors |
src/native/managed/cdac/tests/DumpTests/*DumpTests.cs |
9 test files covering Thread, StackWalk, ServerGC, Object, Loader, Exception, EcmaMetadata, RuntimeInfo, and RuntimeTypeSystem contracts |
src/native/managed/cdac/tests/DumpTests/Debuggees/*/Program.cs |
7 debuggee applications (BasicThreads, TypeHierarchy, StackWalk, ServerGC, MultiModule, GCRoots, ExceptionState) |
src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props |
Shared build properties for all debuggees |
src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj |
Helix SDK project for sending dump generation and tests to Helix queues |
src/native/managed/cdac/tests/DumpTests/RunHelixLocally.ps1 |
Script to simulate Helix workflow locally for testing |
src/native/managed/cdac/tests/DumpTests/RunDumpTests.ps1 |
Script for local dump generation and test execution with CI archive support |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Thread.cs |
Adds TryGetValue pattern for platform-specific UEWatsonBucketTrackerBuckets field |
eng/pipelines/runtime.yml |
Adds two CI jobs for cDAC dump tests (x64 reusing CoreCLR_Libraries build, arm64 with full build) |
eng/Versions.props |
Adds MicrosoftDiagnosticsRuntimeVersion package reference |
eng/Subsets.props |
Adds tools.cdacdumptests subset |
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.
No description provided.