Skip to content

Update test asset baselines for ClrMD ELF ImageSize fix#5925

Draft
max-charlamb wants to merge 3 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/fix-elf-module-imagesize-baselines
Draft

Update test asset baselines for ClrMD ELF ImageSize fix#5925
max-charlamb wants to merge 3 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/fix-elf-module-imagesize-baselines

Conversation

@max-charlamb

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.

Verification

Locally overlaying the regenerated baselines, 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.

⚠️ Blocked on test-asset package publish

The regenerated testassets.* packages must be published to the dotnet-diagnostics-tests feed at 1.0.736301 before CI can pass (restore will otherwise fail to find the version). Packages were produced with the repo''s own eng/testassets/rebuild/pack.csproj tooling and are ready to push:

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

Draft until the packages are live.

dotnet-maestro Bot and others added 3 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 <223556219+Copilot@users.noreply.github.com>
Update the test-asset regeneration helpers so they work against the
current repo layout and published baseline version:

- writexml.cmd/.sh: point at the net8.0 dotnet-dump and DebugServices
  unit-test extension outputs (were net6.0 / netcoreapp3.1/publish) and
  drop the stale --fx-version 6.0.8.
- rebuild/rewritexml.cmd + rebuild/*.nuspec: bump the source content
  version 1.0.257801 -> 1.0.351101 (the currently published baseline
  that regeneration reads from).

Tooling-only; not consumed by CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant