Skip to content

Skip NonBacktracking deep nesting test on single-threaded WASM#125021

Merged
lewing merged 1 commit intodotnet:mainfrom
lewing:fix/activeissue-125020
Mar 1, 2026
Merged

Skip NonBacktracking deep nesting test on single-threaded WASM#125021
lewing merged 1 commit intodotnet:mainfrom
lewing:fix/activeissue-125020

Conversation

@lewing
Copy link
Member

@lewing lewing commented Mar 1, 2026

The CharClassSubtraction_DeepNesting_DoesNotStackOverflow test added in #124995 fails with NonBacktracking engine on platforms without multithreading support (e.g. browser-wasm). The 10,000-deep nesting triggers an internal code path that calls Task.InternalWaitCore, which throws PlatformNotSupportedException via ThrowIfMultithreadingIsNotSupported.

This PR:

  • Changes [Theory] to [ConditionalTheory] so SkipTestException works correctly
  • Adds an in-test guard that skips only the NonBacktracking engine variant when !PlatformDetection.IsMultithreadingSupported

Other engine variants (Interpreter, Compiled) continue to run on all platforms.

Fixes #125020

Copilot AI review requested due to automatic review settings March 1, 2026 02:36
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
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

This PR adds an [ActiveIssue] attribute to the CharClassSubtraction_DeepNesting_DoesNotStackOverflow test to skip it on browser-wasm, fixing a CI failure introduced when the test was added in #124995. On browser-wasm, the NonBacktracking engine throws PlatformNotSupportedException, causing test failures.

Changes:

  • Adds [ActiveIssue("https://github.com/dotnet/runtime/issues/125020", TestPlatforms.Browser)] to CharClassSubtraction_DeepNesting_DoesNotStackOverflow to skip the test on browser-wasm

@lewing lewing assigned danmoseley and unassigned lewing Mar 1, 2026
@lewing lewing force-pushed the fix/activeissue-125020 branch from a9d55d8 to d3bd30a Compare March 1, 2026 03:34
@lewing lewing requested a review from danmoseley March 1, 2026 04:35
Copilot AI review requested due to automatic review settings March 1, 2026 04:58
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

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

@lewing
Copy link
Member Author

lewing commented Mar 1, 2026

dotnet/xharness#1547

@lewing lewing changed the title Add [ActiveIssue] for CharClassSubtraction_DeepNesting on browser-wasm Skip NonBacktracking CharClassSubtraction_DeepNesting on browser-wasm Mar 1, 2026
@lewing lewing enabled auto-merge (squash) March 1, 2026 16:47
The CharClassSubtraction_DeepNesting_DoesNotStackOverflow test with
the NonBacktracking engine hits threading APIs (Task.InternalWaitCore)
that are not supported on single-threaded browser-wasm, causing
PlatformNotSupportedException. Other engines work fine on browser-wasm.

Use an in-test guard to skip only the NonBacktracking engine variant
on Browser, keeping Interpreter and Compiled coverage.

Fixes dotnet#125020

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 1, 2026 20:06
@lewing lewing force-pushed the fix/activeissue-125020 branch from fd813e2 to 92edcbb Compare March 1, 2026 20:06
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@lewing lewing changed the title Skip NonBacktracking CharClassSubtraction_DeepNesting on browser-wasm Skip NonBacktracking deep nesting test on single-threaded WASM Mar 1, 2026
@lewing lewing merged commit 9b46e58 into dotnet:main Mar 1, 2026
93 of 95 checks passed
@lewing lewing deleted the fix/activeissue-125020 branch March 1, 2026 22:32
@danmoseley
Copy link
Member

Did I make a mistake reading test results when I merged this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CharClassSubtraction_DeepNesting_DoesNotStackOverflow fails with PlatformNotSupportedException on browser-wasm (NonBacktracking)

6 participants