Skip to content

[wasm][coreclr] runtime tests on CI#123377

Merged
radekdoulik merged 118 commits intodotnet:mainfrom
radekdoulik:clr-wasm-runtime-tests-on-node-2
Feb 19, 2026
Merged

[wasm][coreclr] runtime tests on CI#123377
radekdoulik merged 118 commits intodotnet:mainfrom
radekdoulik:clr-wasm-runtime-tests-on-node-2

Conversation

@radekdoulik
Copy link
Member

@radekdoulik radekdoulik commented Jan 20, 2026

Enable CoreCLR runtime tests on CI for browser/wasm using Node.js
Run CoreCLR runtime tests on browser/wasm in CI, using Node.js as the execution host. The design stays close to how desktop platforms run tests, minimizing complexity.
Key changes

  • CI pipelines: Add browser_wasm build and test jobs in runtime.yml. Introduce TargetsBrowserOnCoreCLR property to distinguish from Mono browser tests, setting TargetsMobile=false so tests follow the
    desktop execution path rather than the mobile/xharness path.
  • Node.js test runner: Add --node flag to run.sh/run.cmd/run.py. Test scripts invoke node corerun.js with a configurable timeout when RunWithNodeJS is set (auto-configured in Helix for CoreCLR browser
    targets).
  • WASM runtime fixes: Increase max memory to 4GB. Fix corerun.cpp to return actual exit code. Rework libCorerun.js exit handling for proper shutdown sequencing. Add 12 new interpreter-to-managed call
    thunks discovered during test execution. Disabled primary reverse thunk lookup which needs fixing in separate PR.
  • Browser host: Propagate managed exit code to Node.js process.exitCode. TypeScript updates for Node.js environment support.
  • Test adjustments: Add PlatformDetection.IsWasm. Mark IsCoreClrInterpreter=true on WASM until codegen lands. Fix threading-related test attributes. Skip tests with known WASM issues:
  • [wasm][coreclr] EH throw in filter enters infinite loop #123793 — 3 tests: throwinfilter, b68872, GitHub_4044
  • [wasm][coreclr] ASSERT FAILED Expression: portableEntryPoint->IsValid() #124221 — 3 tests: GSDelegate, Runtime_70259 (cs + il), Runtime_79354
  • [wasm][coreclr] ASSERT FAILED Expression: slotNumber >= GetNumVirtuals() || pMDRet == m_pDeclMT->GetMethodDescForSlot_NoThrow(slotNumber) #124222 — 3 tests: sin3double, moduleHandleCache, switch6

Set `isTailcall` to `false`, when preparing the call. This is similar
to how we set other state vars for the call, so I did it this way.

Alternatively we can reset the `isTailcall` after updating the stack
and frame for tailcalls. That would invalidate the meaning of the
variable for the rest of the tailcall though, so we would need to
rename it at least to signal, that it is valid only in the beginning
of the tailcall.
@radekdoulik
Copy link
Member Author

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

Copilot AI review requested due to automatic review settings February 18, 2026 14:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

That will be fixed in separate PR
@radekdoulik radekdoulik marked this pull request as ready for review February 19, 2026 10:06
Copilot AI review requested due to automatic review settings February 19, 2026 10:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 4 comments.

@radekdoulik radekdoulik changed the title [wasm][coreclr] WIP runtime tests on CI [wasm][coreclr] runtime tests on CI Feb 19, 2026
Copilot AI review requested due to automatic review settings February 19, 2026 11:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 60 out of 61 changed files in this pull request and generated 6 comments.

# Conflicts:
#	src/coreclr/hosts/corerun/wasm/libCorerun.js
#	src/mono/sample/wasm/browser/wwwroot/main.js
#	src/native/corehost/browserhost/browserhost.cpp
#	src/native/corehost/browserhost/host/index.ts
#	src/native/corehost/browserhost/libBrowserHost.footer.js
#	src/native/libs/Common/JavaScript/types/ems-ambient.ts
@radekdoulik
Copy link
Member Author

/ba-g the failures are unrelated.

runtime-diagnostics failure is #121989

@radekdoulik radekdoulik merged commit 960dca4 into dotnet:main Feb 19, 2026
180 of 185 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Infrastructure-coreclr os-browser Browser variant of arch-wasm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

Comments