Skip to content

Update test asset baselines for ClrMD ELF ImageSize fix - #5925

Merged
max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/fix-elf-module-imagesize-baselines
Jul 15, 2026
Merged

max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/fix-elf-module-imagesize-baselines

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Problem

DebugServicesTests.ModuleTests fails on all Linux dumps (x64 + arm64) after the ClrMD dependency bump, e.g.:

Assert.Equal() Failure: Values differ
Expected: 118784
Actual:   140616

The failing member is IModule.ImageSize, and only for native ELF modules (Windows PE modules are unaffected, so Windows subresults pass).

Root cause

ClrMD 4.1.735601 -> 4.1.735801 includes microsoft/clrmd#1495 (commit 6ac1d967e, "Fix ELF core dump ImageSize to include PT_LOAD anonymous tail"). For ELF modules whose final PT_LOAD segment has MemSiz > FileSiz (a .bss/NOBITS zero-fill tail), the old NT_FILE-derived size under-reported the module footprint. The new, larger ImageSize is correct - it now includes the loader-mapped anonymous tail. This is expected baseline drift from a deliberate ClrMD fix, not a diagnostics regression.

Fix

  • Includes the ClrMD 4.1.735801 bump (the change that requires new baselines).
  • Regenerated the Linux x64/arm64 testassets baseline XMLs (ImageSize values only) and bumped TestAssetsVersion 1.0.351101 -> 1.0.736301. All four 6.0 packages share this pin, so the two Windows packages are republished at the new version with unchanged content.
  • Refreshes the eng/testassets rebuild helper scripts (net8.0 tool paths; 1.0.257801 -> 1.0.351101 source version) so the next regeneration is turn-key. Tooling-only; not consumed by CI.

Test asset packages (published)

The regenerated packages have been published to the dotnet-diagnostics-tests feed at 1.0.736301:

  • TestAssets.Linux.x64.6.0 (baselines updated)
  • TestAssets.Linux.arm64.6.0 (baselines updated)
  • TestAssets.Windows.x64.6.0 (content unchanged)
  • TestAssets.Windows.x86.6.0 (content unchanged)

They were produced with the repo''s own eng/testassets/rebuild/pack.csproj tooling (Arcade date-based version 1.0.736301).

Verification

End-to-end with the published packages (clean restore from the feed, no local overlays), ModuleTests goes from Failed 6 / Passed 3 to Passed 9 / Failed 0. Each corrected value was independently confirmed against the dump''s actual ELF PT_LOAD program headers.

dotnet-maestro Bot and others added 2 commits July 10, 2026 02:01
…60708.1

On relative base path root
Microsoft.Diagnostics.Runtime , Microsoft.Diagnostics.Runtime.Utilities From Version 4.1.735601 -> To Version 4.1.735801
ClrMD 4.1.735801 (microsoft/clrmd#1495, commit 6ac1d967e) fixes ELF core
dump ImageSize to include the PT_LOAD anonymous (.bss/NOBITS) tail. This
increases the reported ImageSize for native ELF modules, breaking the
Linux subresults of DebugServicesTests.ModuleTests against the old
testassets baselines (Windows PE modules are unaffected).

Regenerated the Linux x64/arm64 testassets baseline XMLs (ImageSize only)
and bumped TestAssetsVersion to 1.0.736301 (all four 6.0 packages share
this pin). Verified locally: ModuleTests goes from Failed 6/Passed 3 to
Passed 9/Failed 0.

Co-authored-by: Copilot <[email protected]>
@max-charlamb
max-charlamb marked this pull request as ready for review July 14, 2026 14:30
@max-charlamb
max-charlamb requested a review from a team as a code owner July 14, 2026 14:30
Copilot AI review requested due to automatic review settings July 14, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the diagnostics repo’s Linux dump-module baselines to account for a deliberate ClrMD fix to ELF IModule.ImageSize (including the .bss/anonymous tail of the last PT_LOAD segment), and aligns test asset package consumption accordingly.

Changes:

  • Bump ClrMD packages (Microsoft.Diagnostics.Runtime + .Utilities) from 4.1.735601 to 4.1.735801.
  • Update unit-test TestAssetsVersion pins to 1.0.736301 so Linux baseline XMLs match the corrected ImageSize behavior.
  • Refresh eng/testassets baseline-regeneration/repack helper scripts and nuspecs to use newer tool paths / source package content versions.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/tests/Microsoft.Diagnostics.DebugServices.UnitTests/Microsoft.Diagnostics.DebugServices.UnitTests.csproj Bumps TestAssetsVersion to consume regenerated baselines.
src/tests/DbgShim.UnitTests/DbgShim.UnitTests.csproj Bumps TestAssetsVersion to consume regenerated baselines.
eng/Version.Details.xml Updates ClrMD dependency versions + SHAs.
eng/Version.Details.props Updates the MSBuild properties used to flow ClrMD versions through the build.
eng/testassets/writexml.sh Updates baseline regeneration helper to net8 paths (but currently points at non-publish dotnet-dump output).
eng/testassets/writexml.cmd Updates baseline regeneration helper to net8 paths (but currently points at non-publish dotnet-dump output).
eng/testassets/rebuild/TestAssets.Windows.x86.6.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Windows.x86.5.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Windows.x86.3.1.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Windows.x64.6.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Windows.x64.5.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Windows.x64.3.1.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.x64.6.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.x64.5.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.x64.3.1.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.arm64.6.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.arm64.5.0.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/TestAssets.Linux.arm64.3.1.nuspec Updates rebuild source content version paths.
eng/testassets/rebuild/rewritexml.cmd Updates the “original” source version used by the rewrite helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eng/testassets/writexml.sh Resolved
Comment thread eng/testassets/writexml.cmd Resolved
@max-charlamb
max-charlamb marked this pull request as draft July 14, 2026 14:57
@max-charlamb
max-charlamb marked this pull request as ready for review July 14, 2026 14:57
@max-charlamb
max-charlamb force-pushed the max-charlamb/fix-elf-module-imagesize-baselines branch from f5eec14 to 3e773c3 Compare July 14, 2026 14:57
@max-charlamb
max-charlamb merged commit 95035e6 into dotnet:main Jul 15, 2026
25 checks passed
@max-charlamb
max-charlamb deleted the max-charlamb/fix-elf-module-imagesize-baselines branch July 15, 2026 18:50
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 15, 2026
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