[wasm][coreclr] Disable CircularCctor multithreading tests on single-threaded WASM#126120
Conversation
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
This PR prevents deadlocks/crashes when running CoreCLR loader/type-initialization tests on single-threaded WASM by conditionally skipping the specific test entrypoints that require real multithreading support.
Changes:
- Switch affected C# test entrypoints from
[Fact]to[ConditionalFact(...IsMultithreadingSupported)]. - Update the corresponding BFI
.iltest entrypoints to useXunit.ConditionalFactAttributewithTestLibrary.PlatformDetection.IsMultithreadingSupported.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorFourThreads.cs | Skip the multithreaded test on platforms without multithreading support. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads01.cs | Skip the multithreaded test on platforms without multithreading support. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads02.cs | Skip the multithreaded test on platforms without multithreading support. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads03.cs | Skip the multithreaded test on platforms without multithreading support. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads01BFI.il | Replace FactAttribute with ConditionalFactAttribute gated on IsMultithreadingSupported. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads02BFI.il | Replace FactAttribute with ConditionalFactAttribute gated on IsMultithreadingSupported. |
| src/tests/Loader/classloader/TypeInitialization/CircularCctors/CircularCctorThreeThreads03BFI.il | Replace FactAttribute with ConditionalFactAttribute gated on IsMultithreadingSupported. |
This comment has been minimized.
This comment has been minimized.
…eaded WASM Add ConditionalFact(IsMultithreadingSupported) to CircularCctor tests that require multiple threads. These tests deadlock/crash on single-threaded WASM where threading is not available. Affected tests: - CircularCctorFourThreads - CircularCctorThreeThreads01/02/03 - CircularCctorFourThreadsBFI (IL file) - CircularCctorThreeThreads01BFI/02BFI/03BFI (IL files) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e9fae38 to
3e40f0e
Compare
This comment has been minimized.
This comment has been minimized.
🤖 Copilot Code Review — PR #126120Holistic AssessmentMotivation: Justified. These CircularCctor tests create 3–4 threads to exercise circular static constructor deadlock detection. On single-threaded WASM, threading APIs throw Approach: Correct. Using Summary: ✅ LGTM. Clean, consistent, and complete change. All multi-threading CircularCctor tests are covered (the only sibling, Detailed Findings✅ Correctness — ConditionalFact applied correctlyAll 4 C# files correctly replace ✅ IL encoding — Correct attribute encodingThe IL files correctly encode the The required assembly externs ( ✅ Completeness — All multi-threaded tests coveredVerified that the
✅ TestLibrary dependency — Correctly resolvedThe ✅ ActiveIssue removal in FourThreadsBFI.il — AppropriateThe This was a workaround for the exact same threading issue. Replacing it with 💡 Unused
|
|
/ba-g stucked infrastructure |
|
ci-analysis, to be sure the runtime tests were not broken ● Let me check if any had actual test failures: ● Check all 74 work items for exit codes (shell) ● Read shell output Waiting up to 120 seconds for command output ● Shell "Check all 74 work items for exit codes" completed ● Yes — all real tests completed and passed. Here's the summary:
Verdict: All coreclr/browser-wasm Pri0 runtime tests passed. The "failure" is purely infrastructure — AzDO timed out waiting for Helix queue, then revoked the upload token. |
Note
This PR was created with Copilot assistance.
Add
ConditionalFact(IsMultithreadingSupported)to CircularCctor tests thatrequire multiple threads. These tests deadlock/crash on single-threaded
WASM where threading is not available.
Affected tests: