Skip to content

[wasm] Build a test-specific corerun for nine more runtime tests - #133367

Open
radekdoulik wants to merge 3 commits into
dotnet:mainfrom
radekdoulik:wasm-enable-relink-tests
Open

[wasm] Build a test-specific corerun for nine more runtime tests#133367
radekdoulik wants to merge 3 commits into
dotnet:mainfrom
radekdoulik:wasm-enable-relink-tests

Conversation

@radekdoulik

Copy link
Copy Markdown
Member

Nine runtime test projects opted out of the test-specific corerun on browser-wasm because the interop generator could not handle their P/Invoke surface. #131877 replaced the hardcoded struct-size table with crossgen2's type system, and these nine no longer need the opt-out.

Removing it lets each build its own corerun.wasm with the test's native library linked in, which sets __TestNativeAssetsLinked and so lifts the PlatformDoesNotSupportNativeTestAssets gate — the native-dependent methods execute instead of skipping.

Project
Interop/StructMarshalling/PInvoke/NestedStruct
JIT/Directed/StructABI/StructABI
JIT/Directed/callconv/CdeclMemberFunction/CdeclMemberFunctionTest
JIT/Directed/callconv/PlatformDefaultMemberFunction/PlatformDefaultMemberFunctionTest
JIT/Directed/callconv/StdCallMemberFunction/StdCallMemberFunctionTest
JIT/Directed/callconv/ThisCall/ThisCallTest
JIT/Methodical/Methodical_others
JIT/SIMD/JIT.SIMD_r
JIT/SIMD/JIT.SIMD_ro

Methodical_others is a merged runner whose reverse P/Invokes the generator previously could not emit helpers for.

Verification

All 41 opt-out projects were built for browser-wasm with the property removed, then run; the nine here are the ones that both link a corerun and pass. The other 32 were restored, each because of a specific blocker this change does not address — those stay tracked by #131811.

Verified from a clean tree at the final state: 9/9 build, 9/9 link their own corerun.wasm, 9/9 report END EXECUTION - PASSED. Local only, macOS/arm64 with node.

CI

The browser_wasm runtime-test leg (coreclr Pri0 Runtime Tests Run browser wasm checked) is green on main and is what this change triggers, via SetPathVars_runtimetests. All nine are Pri0, so they run there.

Note

This description was drafted with GitHub Copilot.

radekdoulik and others added 2 commits September 7, 2026 18:15
dotnet#131877 replaced the hardcoded struct-size table in the wasm interop
generator with crossgen2's type system, so nine of the projects that
opted out of the test-specific corerun no longer need to.

Each was verified by building and running it for browser-wasm: all nine
link their own corerun.wasm and pass, so the methods gated on
PlatformDoesNotSupportNativeTestAssets execute their native code instead
of skipping.

The remaining opt-outs stay. They are blocked on gaps this does not
address, tracked by dotnet#131811.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f6d6e5a4-5b25-4198-b42d-d5b2dc781f47
Copilot AI lite review requested due to automatic review settings September 7, 2026 16:24
@radekdoulik radekdoulik added arch-wasm WebAssembly architecture area-Interop-coreclr labels Sep 7, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@radekdoulik radekdoulik added this to the 12.0.0 milestone Sep 7, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

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.

🟢 Approval recommended

The change is a straightforward removal of browser-wasm CoreCLR opt-outs in test project files with no identified correctness, build-logic, or convention issues in the modified regions.

Pull request overview

This PR removes the WasmBuildTestCorerun=false opt-out from nine src/tests projects so that, for CoreCLR + browser-wasm, they fall back to the default behavior of building a test-specific corerun.wasm when applicable.

Changes:

  • Removed the WasmBuildTestCorerun opt-out (and its explanatory comment) from nine runtime test .csproj files.
  • As a result, these projects will now participate in the browser-wasm CoreCLR test-specific corerun build flow when Common/CLRTest.WasmCorerun.targets is imported.
File summaries
File Description
src/tests/Interop/StructMarshalling/PInvoke/NestedStruct.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Directed/StructABI/StructABI.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Directed/callconv/CdeclMemberFunction/CdeclMemberFunctionTest.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Directed/callconv/PlatformDefaultMemberFunction/PlatformDefaultMemberFunctionTest.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Directed/callconv/StdCallMemberFunction/StdCallMemberFunctionTest.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Directed/callconv/ThisCall/ThisCallTest.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun.
src/tests/JIT/Methodical/Methodical_others.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun in merged runner project.
src/tests/JIT/SIMD/JIT.SIMD_r.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun in merged runner project.
src/tests/JIT/SIMD/JIT.SIMD_ro.csproj Removes browser-wasm CoreCLR opt-out for test-specific corerun in merged runner project.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

@radekdoulik
radekdoulik enabled auto-merge (squash) September 7, 2026 18:17
@lewing

lewing commented Sep 7, 2026

Copy link
Copy Markdown
Member

/azp run runtime-wasm-non-libtests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@lewing

lewing commented Sep 7, 2026

Copy link
Copy Markdown
Member

it looks like:
global::SIMDTests.Vector3InteropTests.Test_Vector3Interop.TestEntryPoint()
needs to be disabled with an active issue?

Keep the forward P/Invoke checks enabled on browser CoreCLR while
skipping only the unsupported reverse P/Invoke delegate entrypoints.

CoreCLR does not support dynamic delegate entrypoints on WebAssembly,
so the reverse P/Invoke half throws PlatformNotSupportedException after
the forward checks pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9731bbb0-50e7-4cde-ba90-73c91c465369
Copilot AI review requested due to automatic review settings September 8, 2026 09:38

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.

🟢 Approval recommended

The changes are limited to removing a targeted wasm opt-out plus a small, consistent test refactor, and no correctness issues were found in the updated code paths.

Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@radekdoulik

Copy link
Copy Markdown
Member Author

it looks like: global::SIMDTests.Vector3InteropTests.Test_Vector3Interop.TestEntryPoint() needs to be disabled with an active issue?

Yes, part of that test was using unsupported dynamic delegate entrypoints. So I split it and disabled the problematic part with active issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Interop-coreclr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants