Skip to content

[runtime tests] Make 2 tests conditional on MT enabled - #125658

Merged
radekdoulik merged 3 commits into
dotnet:mainfrom
radekdoulik:rt-pri1-mt-tests-conditional
Mar 18, 2026
Merged

[runtime tests] Make 2 tests conditional on MT enabled#125658
radekdoulik merged 3 commits into
dotnet:mainfrom
radekdoulik:rt-pri1-mt-tests-conditional

Conversation

@radekdoulik

Copy link
Copy Markdown
Member

No description provided.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

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

Pull request overview

Updates two JIT regression tests to only run when the runtime supports multithreading, avoiding failures/hangs on single-threaded targets.

Changes:

  • Switch b72218 from [Fact] to [ConditionalFact(...IsMultithreadingSupported)].
  • Switch SyncGCHole from [Fact] to [ConditionalFact(...IsMultithreadingSupported)].

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.csMakes the test conditional on multithreading support.
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.csMakes the test conditional on multithreading support.

Comment threadsrc/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.cs
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings March 17, 2026 17:38

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

Pull request overview

This PR updates a pair of JIT regression tests to be skipped on platforms/runtimes where multithreading isn’t supported, avoiding failures due to Thread usage in single-threaded environments.

Changes:

  • Add using TestLibrary; to access PlatformDetection.
  • Replace [Fact] with [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsMultithreadingSupported))] on two tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.csMakes the test conditional on multithreading support via PlatformDetection.
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.csMakes the test conditional on multithreading support via PlatformDetection.

Comment threadsrc/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.cs Outdated
Comment threadsrc/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings March 17, 2026 17:55

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

Pull request overview

Updates two legacy JIT regression tests that create threads so they only run when multithreading is supported (e.g., skipping single-threaded WASM/WASI environments).

Changes:

  • Replace [Fact] with [ConditionalFact(...IsMultithreadingSupported)] on two tests that create Threads.
  • Add using TestLibrary; to access PlatformDetection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.csMakes the test conditional on PlatformDetection.IsMultithreadingSupported.
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.csMakes the test conditional on PlatformDetection.IsMultithreadingSupported.

@radekdoulik
radekdoulik enabled auto-merge (squash) March 17, 2026 18:26
@radekdoulik
radekdoulik merged commit db3c54c into dotnet:mainMar 18, 2026
86 checks passed
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Apr 17, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

@radekdoulik@pavelsavara