Skip to content

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

Merged
radekdoulik merged 3 commits intodotnet: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 intodotnet:mainfrom
radekdoulik:rt-pri1-mt-tests-conditional

Conversation

@radekdoulik
Copy link
Member

No description provided.

@dotnet-policy-service
Copy link
Contributor

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

Copy link
Contributor

Copilot AI left a comment

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.

File Description
src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.cs Makes the test conditional on multithreading support.
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.cs Makes the test conditional on multithreading support.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 17:38
Copy link
Contributor

Copilot AI left a comment

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.

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 17, 2026 17:55
Copy link
Contributor

Copilot AI left a comment

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.

File Description
src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b72218/b72218.cs Makes the test conditional on PlatformDetection.IsMultithreadingSupported.
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b08046cs/SyncGCHole.cs Makes the test conditional on PlatformDetection.IsMultithreadingSupported.

@radekdoulik radekdoulik enabled auto-merge (squash) March 17, 2026 18:26
@radekdoulik radekdoulik merged commit db3c54c into dotnet:main Mar 18, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants