Skip to content

[tests] Add app size test cases to compare managed-static and trimmable-static. - #26412

Open
rolfbjarne wants to merge 3 commits into
net11.0from
dev/rolf/appsize-coreclr-registrar-ab-tests
Open

[tests] Add app size test cases to compare managed-static and trimmable-static.#26412
rolfbjarne wants to merge 3 commits into
net11.0from
dev/rolf/appsize-coreclr-registrar-ab-tests

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Make the registrar explicit in the app size tests, so managed-static and trimmable-static can be compared A/B for the CoreCLR configurations on every platform:

  • Pin Registrar=managed-static in the existing CoreCLR_Interpreter and CoreCLR_R2R test cases, so they keep measuring managed-static even if the default registrar changes.
  • Run the existing CoreCLR_Interpreter_TrimmableStatic test case on iOS tvOS and Mac Catalyst too (it only ran on macOS).
  • Add a new CoreCLR_R2R_TrimmableStatic test case for all four platforms.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: 5cb93db9-707d-4ab3-a9fa-3da0135fcead

rolfbjarne and others added 2 commits August 5, 2026 19:11
…le-static.

Make the registrar explicit in the app size tests, so managed-static and
trimmable-static can be compared A/B for the CoreCLR configurations on every
platform:

* Pin `Registrar=managed-static` in the existing `CoreCLR_Interpreter` and
  `CoreCLR_R2R` test cases, so they keep measuring managed-static even if the
  default registrar changes.
* Run the existing `CoreCLR_Interpreter_TrimmableStatic` test case on iOS, tvOS
  and Mac Catalyst too (it only ran on macOS).
* Add a new `CoreCLR_R2R_TrimmableStatic` test case for all four platforms.

The expected app size files still have to be generated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cb93db9-707d-4ab3-a9fa-3da0135fcead
Copilot AI review requested due to automatic review settings August 5, 2026 19:48
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner August 5, 2026 19:48

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 expands the app-size unit tests to enable an explicit A/B comparison between managed-static and trimmable-static registrars for CoreCLR configurations across Apple platforms, and records new expected-size baselines for the added cases.

Changes:

  • Pin Registrar=managed-static for the existing CoreCLR_Interpreter and CoreCLR_R2R size tests to keep them stable if defaults change.
  • Expand CoreCLR_Interpreter_TrimmableStatic to run on iOS, tvOS, and Mac Catalyst (in addition to macOS).
  • Add a new CoreCLR_R2R_TrimmableStatic test for iOS, tvOS, Mac Catalyst, and macOS, with new expected-size baselines.

Reviewed changes

Copilot reviewed 8 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/dotnet/UnitTests/AppSizeTest.cs Pins registrar for existing CoreCLR tests; broadens trimmable-static coverage and adds a new CoreCLR R2R trimmable-static test matrix.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-Interpreter-TrimmableStatic-size.txt New expected app-size baseline for iOS CoreCLR interpreter + trimmable-static.
tests/dotnet/UnitTests/expected/iOS-CoreCLR-R2R-TrimmableStatic-size.txt New expected app-size baseline for iOS CoreCLR R2R + trimmable-static.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-Interpreter-TrimmableStatic-size.txt New expected app-size baseline for tvOS CoreCLR interpreter + trimmable-static.
tests/dotnet/UnitTests/expected/TVOS-CoreCLR-R2R-TrimmableStatic-size.txt New expected app-size baseline for tvOS CoreCLR R2R + trimmable-static.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-Interpreter-TrimmableStatic-size.txt New expected app-size baseline for Mac Catalyst CoreCLR interpreter + trimmable-static.
tests/dotnet/UnitTests/expected/MacCatalyst-CoreCLR-R2R-TrimmableStatic-size.txt New expected app-size baseline for Mac Catalyst CoreCLR R2R + trimmable-static.
tests/dotnet/UnitTests/expected/MacOSX-CoreCLR-R2R-TrimmableStatic-size.txt New expected app-size baseline for macOS CoreCLR R2R + trimmable-static.

Comment thread tests/dotnet/UnitTests/AppSizeTest.cs Outdated
@vs-mobiletools-engineering-service2

This comment has been minimized.

…itly.

The CoreCLR baseline tests now pin `Registrar=managed-static`, but they were
still named just `CoreCLR-Interpreter`/`CoreCLR-R2R`, which reads like "the
default configuration" rather than "the managed-static configuration" - and it's
about to stop being the default, since the trimmable-static registrar is
becoming the default for CoreCLR on .NET 11+.

Rename them to `CoreCLR-Interpreter-ManagedStatic`/`CoreCLR-R2R-ManagedStatic`
(both the test methods and the expected files), so the registrar is obvious from
the test output and each A/B pair reads symmetrically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cb93db9-707d-4ab3-a9fa-3da0135fcead
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 82df7752dac99c2ddf63d742a67fa5d7d267c6d7 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #82df775] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 256 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 23 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 82df7752dac99c2ddf63d742a67fa5d7d267c6d7 [PR build]

@rolfbjarne
rolfbjarne enabled auto-merge (squash) August 6, 2026 06:12
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.

3 participants