Skip to content

Adjust SkipOnCoreClr for Match_ExcessPrefix test - #59564

Merged
safern merged 1 commit into
dotnet:mainfrom
am11:feature/tests/longrunning-regex
Oct 13, 2021
Merged

Adjust SkipOnCoreClr for Match_ExcessPrefix test#59564
safern merged 1 commit into
dotnet:mainfrom
am11:feature/tests/longrunning-regex

Conversation

@am11

@am11am11 commented Sep 24, 2021

Copy link
Copy Markdown
Member

We wanted this test to skip on: RuntimeConfiguration.Checked or RuntimeTestModes.JitMinOpts,
but SkipOnCoreClr performs RuntimeConfiguration.Checked and RuntimeTestModes.JitMinOpts.

Related: #10680
Fixes: #59541

cc @stephentoub

@ghostghost added community-contribution Indicates that the PR has been added by a community member area-System.Text.RegularExpressions and removed community-contribution Indicates that the PR has been added by a community member labels Sep 24, 2021
@ghost

Copy link
Copy Markdown

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

Issue Details

We wanted this test to skip on: RuntimeConfiguration.Checked or RuntimeTestModes.JitMinOpts,
but SkipOnCoreClr performs RuntimeConfiguration.Checked and RuntimeTestModes.JitMinOpts.

Related: #10680
Fixes: #59541

cc @stephentoub

Author:am11
Assignees:-
Labels:

area-System.Text.RegularExpressions

Milestone:-

@am11
am11force-pushed the feature/tests/longrunning-regex branch from 7ed5777 to 8756c60CompareSeptember 24, 2021 11:00
Comment threadsrc/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs Outdated
@stephentoub

stephentoub commented Sep 24, 2021

Copy link
Copy Markdown
Member

but SkipOnCoreClr performs RuntimeConfiguration.Checked and RuntimeTestModes.JitMinOpts

Thanks. Are there other uses of SkipOnCoreClr that specify multiple conditions? Given that ConditionalXx runs the test only if all conditions pass, as the inverse it would logically make sense if SkipXx didn't run the test if any of them were an issue. So unless we're depending on this in other places, I'd be inclined to fix the attribute instead. But we should also validate other attributes to make sure we maintain consistent behavior so that they remain predictable.
cc: @safern

@am11

am11 commented Sep 24, 2021

Copy link
Copy Markdown
MemberAuthor

Are there other uses of SkipOnCoreClr

There are only two other places where multiple conditions are used:

runtime % git grep 'SkipOnCoreClr.*,.*,' :/
src/libraries/System.Drawing.Common/tests/mono/System.Drawing/BitmapTests.cs: [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/37082", TestPlatforms.AnyUnix, RuntimeConfiguration.Checked)]
src/libraries/System.Runtime.Numerics/tests/BigInteger/BigIntegerToStringTests.cs: [SkipOnCoreClr("Long running tests: https://github.com/dotnet/runtime/issues/11980", TestPlatforms.Linux, RuntimeConfiguration.Checked)]
# ruling out multi-line case
runtime % git grep SkipOnCoreClr :/ | grep -v ']'# nothing

Looks like we want && effect in those two places.

@am11

am11 commented Sep 24, 2021

Copy link
Copy Markdown
MemberAuthor

Browser_wasm_Windows failure is #59556.

@runfoapprunfoappBot mentioned this pull request Sep 24, 2021
@am11
am11force-pushed the feature/tests/longrunning-regex branch 2 times, most recently from e9e200f to a1582f2CompareSeptember 24, 2021 15:33
@safern

Copy link
Copy Markdown
Member

So unless we're depending on this in other places, I'd be inclined to fix the attribute instead.

Maybe a better way to do this is change the SkipOnCoreClrAttribute to behave as the ActiveIssueAttribute which allows multiple attributes and that behaves as an OR. So that way you could add one attribute for Checked configuration and another attribute for the stress mode you want to skip the test.

https://github.com/dotnet/arcade/blob/e43b85e9b4e9ca62b89e407acdf0e56a2cbfd81a/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/SkipOnCoreClrAttribute.cs#L10

ActiveIssueAttribute also behaves as an and for multiple parameters. If you want an OR, you add multiple attributes with different parameters.

@am11
am11force-pushed the feature/tests/longrunning-regex branch from 3fb8693 to df1b082CompareSeptember 24, 2021 17:48
@am11

am11 commented Sep 24, 2021

Copy link
Copy Markdown
MemberAuthor

Maybe a better way to do this is change the SkipOnCoreClrAttribute to behave as the ActiveIssueAttribute which allows multiple attributes

Sounds good. Question, do we want to make the change in arcade and wait for arcade update (+ fix the skip attribute) to fix #59541? Or should we take this change (initial simple version 8756c60) to unblock clean CI and then update arcade lazily?

@safern

Copy link
Copy Markdown
Member

Or should we take this change (initial simple version 8756c60) to unblock clean CI and then update arcade lazily?

If this is blocking PRs and making CI red, we should merge the quickest fix and then cleanup once the attribute supports multiple instances of it.

@am11
am11force-pushed the feature/tests/longrunning-regex branch from df1b082 to 8756c60CompareSeptember 24, 2021 18:27
@am11

am11 commented Sep 24, 2021

Copy link
Copy Markdown
MemberAuthor

Thanks, I have reverted it back to earlier version. I'll follow up on arcade (unless someone else beat me to it 🙂).

@ViktorHofer

Copy link
Copy Markdown
Member

What's the status of this PR? Is it ready to be merged? Asking as this test failure nukes our pass rate (it's 0% right now).

@ViktorHofer

Copy link
Copy Markdown
Member

cc @krwq

@stephentoub

Copy link
Copy Markdown
Member

I've disabled it until the right fix is available

[ActiveIssue("https://github.com/dotnet/runtime/issues/59541")]
.

@am11
am11force-pushed the feature/tests/longrunning-regex branch 2 times, most recently from c92bbf7 to b060d5cCompareOctober 1, 2021 13:37
@am11

am11 commented Oct 1, 2021

Copy link
Copy Markdown
MemberAuthor

Ah, arcade was updated today, just noticed that it missed the fix commit. 😕
Nonetheless, I have adapted the code, after the next arcade update, will re-merged main to PR branch.

@am11
am11force-pushed the feature/tests/longrunning-regex branch from b060d5c to 4502cdeCompareOctober 13, 2021 18:59
@am11

am11 commented Oct 13, 2021

Copy link
Copy Markdown
MemberAuthor

Today's arcade update brought the updated SkipOnCoreClrAttribute. All green. 🌴

@safern
safern merged commit 11adf85 into dotnet:mainOct 13, 2021
@safern

Copy link
Copy Markdown
Member

Thanks, @am11!

@ghostghost locked as resolved and limited conversation to collaborators Nov 13, 2021
@am11
am11 deleted the feature/tests/longrunning-regex branch April 3, 2023 23:13
Sign up for freeto 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.

System.Text.RegularExpressions.Tests.RegexMatchTests.Match_ExcessPrefix Failing in CI

7 participants

@am11@stephentoub@safern@ViktorHofer@danmoseley@hoyosjs@AaronRobinsonMSFT