Skip to content

Modernize CoreCLR testing to .NET 10 and .NET 11 - #615

Merged
Wiktor Kopec (wiktork) merged 4 commits into
mainfrom
test-dotnet10
Oct 15, 2026
Merged

Wiktor Kopec (wiktork) merged 4 commits into
mainfrom
test-dotnet10

Conversation

@wiktork

@wiktork Wiktor Kopec (wiktork) commented Oct 14, 2026 •

Copy link
Copy Markdown
Member
Summary

Modernize CoreCLR testing to cover only .NET 10 and .NET 11 while preserving desktop .NET Framework support.

This is the second draft layer of stack 616, based on #614 (build-pool-cfs). Both layers remain drafts for CI validation and review. This layer includes follow-up fixes for desktop runtime assets, the .NET 11 exception-stack baseline, and portable Linux test-host startup.

Change Log
  • Target the instrumentation tests at net462;net10.0;net11.0 and TestAppRunner at net10.0;net11.0; retire the .NET Core 3.1 and .NET 5/6/7 test targets.
  • Install only the .NET 10/11 SDKs for managed builds/tests, allowing prerelease .NET 11 SDKs.
  • Run Windows CoreCLR tests for .NET 10/11 with both x64 and x86 runtimes; retain the desktop NetFx/Net4X steps and native x86/x64 jobs.
  • Update the Linux matrix to .NET 10 LTS and .NET 11 Next, and move the internal managed-test host to Ubuntu 22.04. Preserve the native build containers' older ABI baselines.
  • Declare portable win-x86 instead of legacy win7-x86 for the existing net462 desktop executor, so restore includes the runtime-specific assets requested by modern SDK builds. Keep the desktop framework target and x86 host unchanged.
  • Exclude only the known CoreLib System.Environment.CallEntryPoint bootstrap frame from exception-snapshot baselines, alongside the existing test-runner exclusion. Continue checking all application frames and exception callback ordering.
  • Set GenerateRuntimeConfigDevFile=false for InstrEngineTests. Copied test artifacts use their adjacent test host instead of obsolete build-machine NuGet probing configuration.
  • Update docs/test.md and related framework comments. Leave docs/build.md, product framework targets, IL tooling versions, minimum-version feature gates, and native project toolsets unchanged.
Test Methodology

Local managed validation used SDK 11.0.100-rc.1.26425.128. The test profiler was compiled for x64 and x86 using the installed v145 toolset with local-only PlatformToolset=v145 and SpectreMitigation=false command-line overrides; the committed native project configuration remains v143. Profiler-backed execution used the native production engine binaries from the preceding CI run and the newly compiled test-profiler DLLs.

For the Windows commands below, $root = (Get-Location).Path was set at the repository root; DOTNET_EXE_X64 and DOTNET_EXE_X86 pointed to the installed x64/x86 dotnet hosts.

Command Result
dotnet build '.\src\Tests\InstrEngineTests\InstrEngineTests\InstrEngineTests.csproj' --no-restore -t:Rebuild -p:Platform=AnyCPU --verbosity quiet Passed for net462, net10.0, and net11.0; zero warnings/errors.
foreach ($framework in @('net10.0','net11.0','net462')) { dotnet test "$root\bin\Debug\AnyCPU\$framework\InstrEngineTests.dll" --settings "$root\tests\TestSettings\x64.runsettings" --verbosity quiet; if ($LASTEXITCODE -ne 0) { throw "Suite failed: $framework" } } Passed: .NET 10 71/71, .NET 11 71/71, desktop 66/66.
dotnet test "$root\bin\Debug\AnyCPU\net11.0\InstrEngineTests.dll" --settings "$root\tests\TestSettings\x64.runsettings" --verbosity quiet Also passed 71/71 with both child-runtime paths pinned to CI's exact 11.0.0-rc.2.26504.105 x64/x86 runtimes. The SDK/test host remained RC1; the instrumented child applications ran RC2.
git --no-pager diff --check 'HEAD^...HEAD' Passed for the follow-up commit.
git --no-pager diff --check 'build-pool-cfs...test-dotnet10' -- Passed for the complete upper layer.

The Linux suite was run under WSL Ubuntu 22.04 with an isolated SDK 10.0.402 / VSTest 18.7.0 and the preceding CI's Linux native binaries. Exact invocation:

wsl -d Ubuntu-22.04 --exec env DOTNET_EXE='/mnt/c/Users/wiktork/.copilot/session-state/7d6d0d6e-106e-4224-8dee-1b789b21b8ce/files/net11-investigation/linux-dotnet/dotnet' DOTNET_ROOT='/mnt/c/Users/wiktork/.copilot/session-state/7d6d0d6e-106e-4224-8dee-1b789b21b8ce/files/net11-investigation/linux-dotnet' '/mnt/c/Users/wiktork/.copilot/session-state/7d6d0d6e-106e-4224-8dee-1b789b21b8ce/files/net11-investigation/linux-dotnet/dotnet' test '/mnt/c/Users/wiktork/.copilot/repos/CLRInstrumentationEngine/bin/Debug/AnyCPU/net10.0/InstrEngineTests.dll' --verbosity quiet

Result: passed, 62 tests passed and 9 skipped (71 total), with no test-host startup exception. Temporary isolated SDK/runtime installations were removed after validation.

Additional artifact checks confirmed that the modern targets no longer emit InstrEngineTests.runtimeconfig.dev.json, retain their normal runtime configuration and adjacent testhost.dll, and preserve desktop targeting. Actual .NET 10/11 exception traces match the complete baseline after the existing bootstrap-line filtering; the .NET 11 CoreLib entry-point frame is specifically marked [TestIgnore].

Earlier validation also parsed all 51 YAML files, compiled all 62 embedded C#/IL fixtures for each modern runtime, passed all 16 Debug/Release and x64/x86 runner smoke cases, and built the desktop executor in x86 Debug/Release using both SDK 10.0.402 and SDK 11 RC1.

CI follow-ups: the initial upper-layer run failed because the desktop executor's legacy RID did not supply net462/win-x86 assets; the portable RID fixes that restore/build mismatch. Run 2026101403 subsequently exposed two test issues: .NET 11 adds the managed startup frame introduced by dotnet/runtime#126222, and VSTest 18.7 crashes when the SDK 11-generated development runtime config lacks additionalProbingPaths. The latest commit addresses both without weakening the application-frame or exception-callback assertions.

The unchanged lower layer already passed run 2026101404. The updated stack is being validated by unsigned run 2026101501, pinned to upper merge commit 0b62c4f9d83de530348954616b8a31261f19052b (updated upper head a15eecb0680b4c7e6db9316fca5c3b64691aa781 plus the passing lower-layer merge). This new run is in progress; no claim of CI success yet.

Not run locally: the full native unit-test matrix, a fresh production-engine build using the CI v143/Spectre configuration, or the complete Linux .NET 11 suite with a locally rebuilt Linux test profiler. Remote CI remains the integration gate. No signed pipeline was manually queued, and neither PR was made ready or merged.

@wiktork
Wiktor Kopec (wiktork) added this pull request to stack #616 October 14, 2026 18:35
Base automatically changed from build-pool-cfs to main October 15, 2026 16:35
Limit CoreCLR test targets, SDKs, runtimes, and Windows/Linux test jobs to .NET 10 and .NET 11 while retaining desktop .NET Framework coverage. Use a supported Linux test host and document the updated test prerequisites.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7d6d0d6e-106e-4224-8dee-1b789b21b8ce
Declare win-x86 for the existing net462 desktop executor so .NET 10 and .NET 11 builds can resolve the runtime-specific assets restored by the pipeline.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7d6d0d6e-106e-4224-8dee-1b789b21b8ce
Ignore only the managed CoreLib entry-point bootstrap frame in exception snapshots and omit obsolete development runtime configuration from portable test artifacts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7d6d0d6e-106e-4224-8dee-1b789b21b8ce
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7d6d0d6e-106e-4224-8dee-1b789b21b8ce
@wiktork
Wiktor Kopec (wiktork) marked this pull request as ready for review October 15, 2026 16:43
@wiktork
Wiktor Kopec (wiktork) requested a review from a team as a code owner October 15, 2026 16:43
@wiktork
Wiktor Kopec (wiktork) merged commit b752639 into main Oct 15, 2026
8 checks passed
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.

2 participants