Skip to content

Conversation

@max-charlamb
Copy link
Member

@max-charlamb max-charlamb commented Mar 17, 2025

dotnet/runtime#110758

Given the cDAC only supports a small subset of the DAC apis, I have created some pared down tests that are CDACCompatible.

Steps to run tests with cDAC:

  1. Build diagnostics repo.
  2. Build runtime repo.
  3. Run eng\privatebuild.cmd in the diagnostics repo
  4. Copy over relevant files from runtime repo to .\dotnet-test. See https://github.com/dotnet/diagnostics/blob/main/documentation/privatebuildtesting.md for example.
    Note, with the addition of the cDAC, cdacreader.dll and all of the dll's under cdaclibs must be copied over as well.
  5. Run eng\testsoscdac.cmd in the diagnostics repo.

The cDAC can be debugged in these tests by running the tests script with $env:VSTEST_HOST_DEBUG=1 which waits for a debugger to attach to the test host. Use VS with the Child Process Debugging Power Tool to selectively debug cdb.exe child process. Note this requires using mixed mode debugging.

@max-charlamb max-charlamb marked this pull request as ready for review March 20, 2025 16:45
@max-charlamb max-charlamb requested a review from a team as a code owner March 20, 2025 16:45
@tommcdon tommcdon requested a review from steveisok March 20, 2025 16:48
<ItemGroup>
<_LiveRuntimeFiles Include="$(LiveRuntimeDir)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(_LiveRuntimeFiles)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time this will work but there can be up to 3 versions of the latest (10) runtime in the .dotnet-test directory

  1. The version installed with the test .NET 10 SDK
  2. The version installed with the aspnetcore latest
  3. The runtime version installed explicitly from the DARC update which is (the MicrosoftNETCoreAppRuntimewinx64Version property) that the $(DotNetInstallDir) is built from.

That is why I didn't automate the private build copying in the instructions. If you only copy #3, then most of the tests will run on that version except the couple of aspnetcore debuggee's (WebApp3, etc.). For the couple of cdac specific tests you created this is sufficient, but for all the tests run to test the cdac private build, the aspnetcore runtime would also need to be copied.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of growing what we have to override with the cdac. After this change it'll be easier to hook up a pipeline that runtime can use to validate cdac changes against this repo.

Copy link
Contributor

@mikem8361 mikem8361 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Left one comment. I'll leave it to you to decide if any changes are neccesary.

@steveisok steveisok merged commit 2d6b8e4 into dotnet:main Mar 20, 2025
21 checks passed
steveisok added a commit to steveisok/diagnostics that referenced this pull request Mar 22, 2025
Follow up to dotnet#5350 that adds the ability to use
the cdac and patch a local copy of the shared framework on non-windows hosts.
mikem8361 pushed a commit that referenced this pull request Mar 24, 2025
Follow up to #5350 that adds
the ability to use the cdac and patch a local copy of the shared
framework on non-windows hosts.

---------

Co-authored-by: kasperk81 <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants