dotnet / dotnet/diagnostics

Add positive cDAC loading policy tests with .NET 11 dumps

Open
#5,932 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.3k
Forks
404
Avg merge
2d 3h
Merged PRs (30d)
38

Description

## Background

Dbgshim now has deterministic negative/fallback coverage for the cDAC loading policies by pointing `DOTNET_CDAC_PATH` at a nonexistent library. The tests verify `LegacyDacOnly`, `PreferCDac`, and `CDacOnly` for both direct `IXCLRDataProcess` activation and the DBI `ICorDebugProcess` path.

The current DbgShim.UnitTests dump assets are .NET 6, so they cannot positively validate activation through `mscordaccore_universal`. Positive coverage requires dumps generated from a compatible .NET 11 runtime and the matching cDAC/DBI artifacts.

## Proposed work

- Generate and publish Windows and Linux .NET 11 dump test assets using the existing diagnostics test-asset workflow.
- Make the matching `mscordaccore_universal` and `mscordbi` available to DbgShim.UnitTests.
- Add positive policy tests for both activation routes:
- Direct data access requesting `IXCLRDataProcess`.
- DBI activation requesting `ICorDebugProcess`.
- Verify policy behavior:
- `CDacOnly` succeeds without invoking the library provider.
- `PreferCDac` succeeds through cDAC without invoking the fallback provider.
- `LegacyDacOnly` uses the legacy DAC provider and succeeds.
- Include Windows-hosted Linux cross-dump coverage so target platform detection and cDAC activation are exercised together.
- Assert which path was used, not only that activation succeeded, using provider invocation counts and/or a test-visible activation signal.

## Acceptance criteria

- Positive cDAC activation is exercised in CI against a .NET 11 dump.
- Direct data-access and DBI routes are both covered.
- All three loading policies have independently identifiable test cases.
- The tests prove cDAC success does not consult the fallback provider.
- Legacy DAC behavior remains covered and unchanged.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the existing DbgShim.UnitTests negative/fallback cDAC policy tests and the diagnostics test-asset workflow. Trace direct IXCLRDataProcess and DBI ICorDebugProcess activation, then add Windows and Linux .NET 11 dump coverage for all three policies. Done means CI proves positive cDAC activation, provider selection, and unchanged legacy DAC behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools, operating-systems, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.