Skip to content

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

Draft
radekdoulik wants to merge 98 commits intodotnet:mainfrom
radekdoulik:clr-wasm-runtime-tests-on-node-2
Draft

[wasm][coreclr] WIP runtime tests on CI#123377
radekdoulik wants to merge 98 commits intodotnet:mainfrom
radekdoulik:clr-wasm-runtime-tests-on-node-2

Conversation

@radekdoulik
Copy link
Member

@radekdoulik radekdoulik commented Jan 20, 2026

TODO

  • update windows scripts to run on node too
  • make it run on CI
  • make it pass on CI, create issues for remaining crashes

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).

</Target>

<Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true' and '$(CLRTestKind)' != 'SharedLibrary'" />
<Import Project="$(RepoRoot)/src/tests/Common/mergedrunnermobile.targets" Condition="'$(TargetsMobile)' == 'true' and '$(CLRTestKind)' != 'SharedLibrary' and ('$(TargetArchitecture)' != 'wasm' or '$(RuntimeFlavor)' != 'CoreCLR')" />
Copy link
Member

Choose a reason for hiding this comment

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

I assume that this will be removed once the CI integration work is done. If not, we should figure out what needs to change here (we want to be on the same tooling as the libraries tests, when possible, to help reduce cost of maintaining this test tree).

Copy link
Member Author

Choose a reason for hiding this comment

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

The intention here is to be as close to the desktop runtime tests as possible, to keep the tests simple to debug, with minimal added complexity.

Copilot AI review requested due to automatic review settings February 12, 2026 09:52
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 58 out of 59 changed files in this pull request and generated 1 comment.

Comment on lines 47 to 80
if /i "%1" == "x64" (set __BuildArch=x64&shift&goto Arg_Loop)
if /i "%1" == "x86" (set __BuildArch=x86&shift&goto Arg_Loop)
if /i "%1" == "arm64" (set __BuildArch=arm64&shift&goto Arg_Loop)

if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop)
if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop)
if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop)

if /i "%1" == "TestEnv" (set __TestEnv=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "sequential" (set __Sequential=1&shift&goto Arg_Loop)
if /i "%1" == "parallel" (set __ParallelType=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitstress" (set DOTNET_JitStress=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitstressregs" (set DOTNET_JitStressRegs=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "jitminopts" (set DOTNET_JITMinOpts=1&shift&goto Arg_Loop)
if /i "%1" == "jitforcerelocs" (set DOTNET_ForceRelocs=1&shift&goto Arg_Loop)

if /i "%1" == "printlastresultsonly" (set __PrintLastResultsOnly=1&shift&goto Arg_Loop)
if /i "%1" == "logsdir" (set LogsDirArg=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "runcrossgen2tests" (set RunCrossGen2=1&shift&goto Arg_Loop)
REM This test feature is currently intentionally undocumented
if /i "%1" == "runlargeversionbubblecrossgen2tests" (set RunCrossGen2=1&set CrossgenLargeVersionBubble=1&shift&goto Arg_Loop)
if /i "%1" == "synthesizepgo" (set CrossGen2SynthesizePgo=1&shift&goto Arg_Loop)
if /i "%1" == "gcname" (set DOTNET_GCName=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "gcstresslevel" (set DOTNET_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop)
if /i "%1" == "gcsimulator" (set __GCSimulatorTests=1&shift&goto Arg_Loop)
if /i "%1" == "longgc" (set __LongGCTests=1&shift&goto Arg_Loop)
if /i "%1" == "ilasmroundtrip" (set __IlasmRoundTrip=1&shift&goto Arg_Loop)
if /i "%1" == "timeout" (set __TestTimeout=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "runincontext" (set RunInUnloadableContext=1&shift&goto Arg_Loop)
if /i "%1" == "tieringtest" (set TieringTest=1&shift&goto Arg_Loop)
if /i "%1" == "runnativeaottests" (set RunNativeAot=1&shift&goto Arg_Loop)
if /i "%1" == "interpreter" (set RunInterpreter=1&shift&goto Arg_Loop)
if /i "%1" == "node" (set RunWithNodeJS=1&shift&goto Arg_Loop)

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

run.cmd documents and parses a node switch, but this script currently has no way to target the wasm architecture (wasm) or the browser OS (browser) the way run.sh does. As written, --node can’t be used to run the intended browser/wasm scenarios. Consider adding argument handling for wasm (arch) and browser (OS), and defaulting to browser when __BuildArch==wasm (similar to run.sh).

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 12, 2026 11: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 58 out of 59 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings February 12, 2026 13:21
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 58 out of 59 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/tests/JIT/Directed/Misc/function_pointer/MutualThdRecur-fptr.il:13

  • This IL file now declares the same extern assemblies multiple times (e.g. Microsoft.DotNet.XUnitExtensions, System.Runtime, TestLibrary). ILAsm typically treats duplicate .assembly extern declarations as an error. Please remove the duplicates or keep a single consolidated set of extern references at the top of the file.

Comment on lines +75 to +81
<TargetsBrowserOnMono>false</TargetsBrowserOnMono>
<TargetsBrowserOnMono Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'mono'">true</TargetsBrowserOnMono>
<TargetsBrowserOnCoreCLR>false</TargetsBrowserOnCoreCLR>
<TargetsBrowserOnCoreCLR Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'coreclr'">true</TargetsBrowserOnCoreCLR>
<TargetsMobile Condition="'$(TargetsBrowser)' == 'true' and '$(RuntimeFlavor)' == 'coreclr'">false</TargetsMobile>
<MobileAppBundleDirName Condition="'$(TargetsMobile)' == 'true' and '$(TargetsBrowser)' != 'true'">AppBundle</MobileAppBundleDirName>
<MobileAppBundleDirName Condition="'$(TargetsBrowser)' == 'true'">wwwroot</MobileAppBundleDirName>
<MobileAppBundleDirName Condition="'$(TargetsBrowserOnMono)' == 'true'">wwwroot</MobileAppBundleDirName>
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

RuntimeFlavor comparisons in this file use inconsistent casing (e.g. 'mono'/'coreclr' vs 'Mono'/'CoreCLR'). Since RuntimeFlavor is set by pipelines as 'CoreCLR' by default, conditions like TargetsBrowserOnCoreCLR and TargetsMobile will never become true, which can break the CoreCLR browser/wasm flow (NodeJS path, payload prep, log checker gating). Consider normalizing once (e.g. $(RuntimeFlavor.ToLowerInvariant())) or comparing against the actual cased values consistently throughout the file.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 12, 2026 22:00
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 58 out of 59 changed files in this pull request and generated 1 comment.

Comment on lines +206 to +209
# Set default for RunWithNodeJS when using wasm architecture
if [ "$buildArch" = "wasm" ] && [ -z "$RunWithNodeJS" ]; then
export RunWithNodeJS=1
fi
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

RunWithNodeJS is now defaulted on whenever buildArch=wasm. However this happens before buildOS inference and also applies even if the caller explicitly sets buildOS=wasi, where the "--node" mode isn’t applicable. Consider moving this default after the wasm->browser defaulting, and gating it on buildOS=browser (or only when buildOS is unset), so WASI test runs don’t inadvertently get forced into NodeJS mode.

Copilot uses AI. Check for mistakes.
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: No status

Development

Successfully merging this pull request may close these issues.

4 participants