Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust SkipOnCoreClr for Match_ExcessPrefix test #59564

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

am11
Copy link
Member

@am11 am11 commented Sep 24, 2021

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

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 24, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added 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

ghost commented Sep 24, 2021

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 am11 force-pushed the feature/tests/longrunning-regex branch from 7ed5777 to 8756c60 Compare September 24, 2021 11:00
@stephentoub
Copy link
Member

stephentoub commented Sep 24, 2021

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
Copy link
Member Author

am11 commented Sep 24, 2021

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
Copy link
Member Author

am11 commented Sep 24, 2021

Browser_wasm_Windows failure is #59556.

@am11 am11 force-pushed the feature/tests/longrunning-regex branch 2 times, most recently from e9e200f to a1582f2 Compare September 24, 2021 15:33
@safern
Copy link
Member

safern commented Sep 24, 2021

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 am11 force-pushed the feature/tests/longrunning-regex branch from 3fb8693 to df1b082 Compare September 24, 2021 17:48
@am11
Copy link
Member Author

am11 commented Sep 24, 2021

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
Member

safern commented Sep 24, 2021

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 am11 force-pushed the feature/tests/longrunning-regex branch from df1b082 to 8756c60 Compare September 24, 2021 18:27
@am11
Copy link
Member Author

am11 commented Sep 24, 2021

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
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
Member

cc @krwq

@stephentoub
Copy link
Member

I've disabled it until the right fix is available

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

@am11 am11 force-pushed the feature/tests/longrunning-regex branch 2 times, most recently from c92bbf7 to b060d5c Compare October 1, 2021 13:37
@am11
Copy link
Member Author

am11 commented Oct 1, 2021

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 am11 force-pushed the feature/tests/longrunning-regex branch from b060d5c to 4502cde Compare October 13, 2021 18:59
@am11
Copy link
Member Author

am11 commented Oct 13, 2021

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

@safern safern merged commit 11adf85 into dotnet:main Oct 13, 2021
@safern
Copy link
Member

safern commented Oct 13, 2021

Thanks, @am11!

@ghost ghost 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 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.

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