Skip to content

Run browser wasm runtime tests with ReadyToRun - #133134

Merged
lewing merged 6 commits into
mainfrom
fix-wasm-r2r-test-execution
Sep 3, 2026
Merged

Run browser wasm runtime tests with ReadyToRun#133134
lewing merged 6 commits into
mainfrom
fix-wasm-r2r-test-execution

Conversation

@lewing

@lewing lewing commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

Add a parallel browser-wasm CoreCLR runtime-test leg with readyToRun: true. The existing browser leg exercises the interpreter; the new leg Crossgen2-compiles merged runners and their referenced test assemblies to wasm so wasm JIT regressions are actually exercised.

This replaces the per-test AlwaysUseCrossGen2 / RequiresProcessIsolation workaround with systemic merged-runner coverage.

Changes

  • Add a browser-wasm R2R_CG2 innerloop job while retaining the interpreter job.
  • Skip the generic framework Crossgen2 step for wasm; wasm framework and test R2R compilation use the wasm-specific paths instead.
  • Remove redundant per-test Crossgen2/isolation settings from Runtime_131285, Runtime_131373, Runtime_131635, and Runtime_131640.
  • Set the established TEST_READY_TO_RUN_MODE environment marker from the shared Crossgen2 scripts, covering native and wasm runtime-test R2R lanes.
  • Mark Runtime_70259 active-issue only for wasm R2R. It still compiles to R2R, but execution is skipped because it currently asserts in ToPortableEntryPoint under this newly enabled coverage.

Validation

  • Built JIT/Regression/Regression_2.csproj for browser-wasm Checked.
  • Ran the merged runner with Crossgen2 and confirmed the four target regressions were emitted as wasm R2R images and executed.
  • Confirmed Runtime_70259 is R2R-compiled and recorded against its active issue only when the ReadyToRun environment marker is present.
  • Generated the browser-wasm Crossgen2 test layout successfully without invoking the incompatible generic framework Crossgen2 step.

Note

This pull request description was updated with the assistance of GitHub Copilot.

Runtime_131285 and Runtime_131373 lacked RequiresProcessIsolation, so
they resolved to CLRTestKind=SharedLibrary (build-only) instead of
BuildAndRun, meaning no execution script was ever generated and the
tests silently passed without exercising the wasm R2R codegen they
were written to validate. Confirmed both now run end-to-end under
node with the fix and pass (Expected/Actual: 100).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db8401cb-c388-4481-a625-34811ab8a269
Copilot AI lite review requested due to automatic review settings September 2, 2026 23:45
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 2, 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 this area: @JulieLeeMSFT, @jakobbotsch
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 consistent with existing src/tests infrastructure (RequiresProcessIsolation -> OutputType=Exe -> CLRTestKind=BuildAndRun) and is a low-risk test-project fix with no additional issues found.

Pull request overview

This PR updates two JIT regression test projects under src/tests/JIT/Regression/JitBlue/ so they are classified as runnable tests (BuildAndRun) rather than shared-library build-only projects, ensuring their browser/wasm crossgen2 R2R path is actually exercised.

Changes:

  • Set RequiresProcessIsolation=true for Runtime_131285 and Runtime_131373 so OutputType=Exe is inferred and CLRTestKind becomes BuildAndRun.
  • Add brief comments explaining why process isolation is required to avoid silent build-only “passes”.
File summaries
File Description
src/tests/JIT/Regression/JitBlue/Runtime_131373/Runtime_131373.csproj Marks the test as process-isolated so it generates/run-scripts and executes instead of building only.
src/tests/JIT/Regression/JitBlue/Runtime_131285/Runtime_131285.csproj Same: forces runnable classification via RequiresProcessIsolation to ensure the test actually executes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

Comment thread src/tests/JIT/Regression/JitBlue/Runtime_131285/Runtime_131285.csproj Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: df5c3f14-aa63-4239-bebd-8cf863c70f96
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: df5c3f14-aa63-4239-bebd-8cf863c70f96
Copilot AI review requested due to automatic review settings September 3, 2026 01:31
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: df5c3f14-aa63-4239-bebd-8cf863c70f96
@lewing lewing changed the title Fix wasm R2R regression tests to actually run instead of build-only Run browser wasm runtime tests with ReadyToRun Sep 3, 2026

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.

🟡 Changes recommended

PaddingHelper.PadStream can now hang indefinitely if constructed with a zero-length buffer, so it should defensively guard against that to avoid tooling/build deadlocks.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 01:42
@lewing lewing added the arch-wasm WebAssembly architecture label Sep 3, 2026
@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.

@lewing
lewing requested a review from akoeplinger September 3, 2026 01:44

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.

🟡 Changes recommended

Runtime_70259.cs gains an ActiveIssue attribute but lacks the needed using directives / qualification, so the “IL source” reference file no longer compiles if used for IL regeneration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread src/tests/JIT/Regression/JitBlue/Runtime_70259/Runtime_70259.cs Outdated
Comment thread src/tests/Common/CLRTest.Execute.Batch.targets Outdated
Comment thread src/tests/JIT/Regression/JitBlue/Runtime_70259/Runtime_70259.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: df5c3f14-aa63-4239-bebd-8cf863c70f96
Copilot AI review requested due to automatic review settings September 3, 2026 13:47
Comment thread eng/pipelines/runtime.yml

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.

🔵 Needs a closer look

It changes CI/test execution infrastructure (pipeline + Crossgen/R2R test plumbing), which has a high blast radius and warrants final validation by a human reviewer/CI run results.

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

Comment thread eng/pipelines/runtime.yml
extraBuildArgs: -os browser -p:HostConfiguration=Release
condition: >-
or(
eq(variables['wasmDarcDependenciesChanged'], true),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@adamperlin How are we testing Wasm R2R currently? I would have expected a test leg like this to already exist somewhere, but I haven’t been able to find.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is/was some testing in outerloop, for example, it lead to this issue

#131925

@lewing

lewing commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

This should be updated to also remove the process isolation from #133136 if it merges first.

@lewing

lewing commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

the sos failures are #133175 but BI/BA don't match because of what they scan

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@lewing

lewing commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

/ba-g SOS failures are tracked in #133175

@lewing
lewing disabled auto-merge September 3, 2026 18:35
@lewing
lewing merged commit 490663f into main Sep 3, 2026
185 of 192 checks passed
@lewing
lewing deleted the fix-wasm-r2r-test-execution branch September 3, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants