Skip to content

Add experimental Regex test based on SampleMatches#79364

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:regexgeneratetest
Dec 8, 2022
Merged

Add experimental Regex test based on SampleMatches#79364
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:regexgeneratetest

Conversation

@stephentoub

@stephentoub stephentoub commented Dec 7, 2022

Copy link
Copy Markdown
Member

This adds a (currently disactivated) test that takes the ~15K regexes in our pattern database, generates inputs for each using the NonBacktracking engine's sampler, and then validates all the engines with that pattern. The sampler currently hangs on some patterns, and it asserts on others, so this is manual-only until such issues can be fixed. Still, I was able to run another ~10K patterns through all the engines before it fell over with an assert. The sampler also only currently supports generating inputs known to match; it'd be good to also generate inputs known to not match.

Closes #25372

This adds a (currently disactivated) test that takes the ~15K regexes in our pattern database, generates inputs for each using the NonBacktracking engine's sampler, and then validates all the engines with that pattern.  The sampler currently hangs on some patterns, and it asserts on others, so this is manual-only until such issues can be fixed.  Still, I was able to run another ~10K patterns through all the engines before it fell over with an assert.
@ghost

ghost commented Dec 7, 2022

Copy link
Copy Markdown

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

Issue Details

This adds a (currently disactivated) test that takes the ~15K regexes in our pattern database, generates inputs for each using the NonBacktracking engine's sampler, and then validates all the engines with that pattern. The sampler currently hangs on some patterns, and it asserts on others, so this is manual-only until such issues can be fixed. Still, I was able to run another ~10K patterns through all the engines before it fell over with an assert.

Author: stephentoub
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: -

@joperezr

joperezr commented Dec 7, 2022

Copy link
Copy Markdown
Member

Closes #25372

Since the test is still disabled, should we keep either this issue open or have a new one to enable it eventually?

@stephentoub

Copy link
Copy Markdown
Member Author

Since the test is still disabled, should we keep either this issue open or have a new one to enable it eventually?

I'll open a new one. Thanks.

@stephentoub stephentoub merged commit 5316939 into dotnet:main Dec 8, 2022
@stephentoub stephentoub deleted the regexgeneratetest branch December 8, 2022 01:24
@ghost ghost locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate generating matching strings for test regexes and adding to testbed

2 participants