Skip NonBacktracking deep nesting test on single-threaded WASM#125021
Merged
lewing merged 1 commit intodotnet:mainfrom Mar 1, 2026
Merged
Skip NonBacktracking deep nesting test on single-threaded WASM#125021lewing merged 1 commit intodotnet:mainfrom
lewing merged 1 commit intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions |
Contributor
There was a problem hiding this comment.
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)]toCharClassSubtraction_DeepNesting_DoesNotStackOverflowto skip the test on browser-wasm
src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs
Outdated
Show resolved
Hide resolved
a9d55d8 to
d3bd30a
Compare
jkotas
reviewed
Mar 1, 2026
src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs
Outdated
Show resolved
Hide resolved
jkotas
approved these changes
Mar 1, 2026
This was referenced Mar 1, 2026
Member
Author
stephentoub
reviewed
Mar 1, 2026
src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs
Outdated
Show resolved
Hide resolved
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>
fd813e2 to
92edcbb
Compare
src/libraries/System.Text.RegularExpressions/tests/FunctionalTests/Regex.Match.Tests.cs
Show resolved
Hide resolved
Member
|
Did I make a mistake reading test results when I merged this? |
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.
The
CharClassSubtraction_DeepNesting_DoesNotStackOverflowtest 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 callsTask.InternalWaitCore, which throwsPlatformNotSupportedExceptionviaThrowIfMultithreadingIsNotSupported.This PR:
[Theory]to[ConditionalTheory]soSkipTestExceptionworks correctly!PlatformDetection.IsMultithreadingSupportedOther engine variants (Interpreter, Compiled) continue to run on all platforms.
Fixes #125020