Repository navigation
Run out-of-process runtime tests on WASI - #136047
Merged
lewing merged 4 commits intoOct 26, 2026
Merged
Conversation
Merged runners on WASI reported their RequiresProcessIsolation tests as passed without running them. Reuse the browser host orchestration: the runner writes a plan, the wrapper runs each test's own wrapper, and the runner imports the results. A WASI guest only sees the runner's directory, so results are collected there and located through __TestOutOfProcessResultDirectory. Also: - Forward the test environment, DOTNET_*/COMPlus_* settings and the protocol variables into the wasmtime guest, which inherits nothing. - Keep the test's runtime configuration away from the WASI R2R composer. - Report R2RIncompatible as a skip to the orchestrating runner. - Export the corerun link kit for WASI and build test-specific hosts for tests with native code, as on browser; build native test libraries for WASI CoreCLR. - Gate tests that need capabilities WebAssembly lacks, and quarantine the WASI composite ReadyToRun failures against dotnet#134949. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3416bffe-1925-4a9b-93a7-200f93ec7be8
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
The WASI runtime-test build failed in CI because WASI_SDK_PATH pointed at the container's wasi-sdk, which differs from the version the runtime is built with: the test-specific corerun relink and the native test libraries used it, and its linker did not accept the component options the kit carries. Resolve the SDK the way eng/AcquireWasiSdk.targets does in both places: honor WASI_SDK_PATH only when it is the expected version, otherwise use the shared tool cache. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3416bffe-1925-4a9b-93a7-200f93ec7be8
On Linux, init-compiler.sh adds -fuse-ld=lld to LDFLAGS, which CMake folds into CMAKE_EXE_LINKER_FLAGS. The corerun link kit copied it into corerun-link.rsp, where it came after the consumer's -fuse-ld=wasm-component-ld and won, so wasm-ld rejected --component-type. Leave linker selection out of the kit, and pass the consumer's linker after the response file. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3416bffe-1925-4a9b-93a7-200f93ec7be8
pavelsavara
approved these changes
Oct 23, 2026
radekdoulik
reviewed
Oct 23, 2026
radekdoulik
left a comment
Member
There was a problem hiding this comment.
Suggestions for the two WASI test-infrastructure fixes. The upload-path suggestions need to be applied together.
Note
These suggestions were drafted with GitHub Copilot.
lewing
enabled auto-merge (squash)
October 23, 2026 14:18
The WASI guest could not write the merged runner's results to HELIX_WORKITEM_UPLOAD_ROOT: the variable was not forwarded and the directory was not preopened, so Helix published no WASI runtime-test results. Preopen it and pass its guest path, building the launcher as an array so an upload path with spaces stays one argument. A planned out-of-process test whose directory is absent was recorded as passing, because its skip reason could not be written there. Record the skip directly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3416bffe-1925-4a9b-93a7-200f93ec7be8
radekdoulik
approved these changes
Oct 26, 2026
Member
Author
|
/ba-g windows failure is unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On WASI, merged runtime-test runners reported their out-of-process (
RequiresProcessIsolation) tests as passed without running them. This makes them run in both WASI lanes (interpreter and composite R2R) by reusing browser's host-side orchestration from #131110. The pieces are coupled: tests with native code only run out-of-process with a relinkedcorerun.wasm, and enabling the tests surfaces the classifications below.CLRTest.Execute.Bash.targetsbecomes a shared function for browser and WASI. WASI results go to the runner's preopened directory, and a WASI runner started without orchestration now fails instead of passing.testkit.cmakeexports the corerun link kit for WASI,CLRTest.WasmCorerun.targetsdrives wasi-sdkclang++, and native test libraries build for WASI CoreCLR.gen-buildsys.shnow usesWASI_SDK_PATHonly when it is the expected wasi-sdk version, likeAcquireWasiSdk.targets; this affects every WASI native build, not just tests.DOTNET_GCStress, andR2RIncompatiblereports Skip instead of Pass.TargetArchitecture == wasmconditions ([wasi][coreCLR] Track out-of-process runtime tests disabled on WASI #136046, [browser][coreCLR] Track disabled OOP runtime tests pending browser support #131321); composite-R2R-onlyuninitialized elementtraps are quarantined under [wasi][R2R] Runtime test failures: prestub assert in self_override5, uninitialized element in overflow01_div #134949.Loader/TrustedPlatformAssembliesPropertynow skips itself in R2R, where its ownAPP_ASSEMBLIESsetting was overriding the R2R host.All 206 out-of-process tests now run in each lane; the interpreter lane skips 13, the composite R2R lane 40. Browser behavior should be unchanged but needs browser CI, and the CI provisioning of wasi-sdk for the relink hasn't been exercised yet.
Note
This PR description was drafted with the help of GitHub Copilot.