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

[iOS/tvOS] RegexCultureTests.Match_In_Different_Cultures test failures #60697

Closed
steveisok opened this issue Oct 20, 2021 · 10 comments · Fixed by #67709
Closed

[iOS/tvOS] RegexCultureTests.Match_In_Different_Cultures test failures #60697

steveisok opened this issue Oct 20, 2021 · 10 comments · Fixed by #67709

Comments

@steveisok
Copy link
Member

After #60607 was merged, certain theory runs started failing in the Match_In_Different_Cultures test. Unsure as to why at this point, but here is an example failure:

<test name="System.Text.RegularExpressions.Tests.RegexCultureTests.Match_In_Different_Cultures(pattern: \&quot;(?i:iI+)\&quot;, options: None, culture: , input: \&quot;abcIiİxyz\&quot;, match_expected: \&quot;Iiİ\&quot;)" type="System.Text.RegularExpressions.Tests.RegexCultureTests" method="Match_In_Different_Cultures" time="0.0057729" result="Fail">
        <failure exception-type="Xunit.Sdk.EqualException">
          <message><![CDATA[Assert.Equal() Failure\n            ↓ (pos 2)\nExpected: Iiİ\nActual:   Ii\n            ↑ (pos 2)]]></message>
          <stack-trace><![CDATA[   at System.Text.RegularExpressions.Tests.RegexCultureTests.Match_In_Different_Cultures(String pattern, RegexOptions options, CultureInfo culture, String input, String match_expected)
   at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1& parameters)]]></stack-trace>
        </failure>
      </test>

The rest can be found in https://gist.github.com/steveisok/702d94768c660462f0df76889c877e71

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Text.RegularExpressions untriaged New issue has not been triaged by the area owner labels Oct 20, 2021
@ghost
Copy link

ghost commented Oct 20, 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

After #60607 was merged, certain theory runs started failing in the Match_In_Different_Cultures test. Unsure as to why at this point, but here is an example failure:

<test name="System.Text.RegularExpressions.Tests.RegexCultureTests.Match_In_Different_Cultures(pattern: \&quot;(?i:iI+)\&quot;, options: None, culture: , input: \&quot;abcIiİxyz\&quot;, match_expected: \&quot;Iiİ\&quot;)" type="System.Text.RegularExpressions.Tests.RegexCultureTests" method="Match_In_Different_Cultures" time="0.0057729" result="Fail">
        <failure exception-type="Xunit.Sdk.EqualException">
          <message><![CDATA[Assert.Equal() Failure\n            ↓ (pos 2)\nExpected: Iiİ\nActual:   Ii\n            ↑ (pos 2)]]></message>
          <stack-trace><![CDATA[   at System.Text.RegularExpressions.Tests.RegexCultureTests.Match_In_Different_Cultures(String pattern, RegexOptions options, CultureInfo culture, String input, String match_expected)
   at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1& parameters)]]></stack-trace>
        </failure>
      </test>

The rest can be found in https://gist.github.com/steveisok/702d94768c660462f0df76889c877e71

Author: steveisok
Assignees: -
Labels:

area-System.Text.RegularExpressions, untriaged

Milestone: -

@steveisok
Copy link
Member Author

/cc @stephentoub

@veanes
Copy link
Contributor

veanes commented Oct 20, 2021

I just took a look in Match_In_Different_Cultures_TestData(). Original intent with this test (I wrote the original version of this test) was to make sure correct behavior in NonBacktracking. It seems some of those tests have been also lifted to Compiled and None, where the problem is caused by incorrect handling of the Turkish i's: \u0130 and \u0131 that is still an open issue I believe.

@stephentoub
Copy link
Member

They were extended here to None and Compiled:
https://github.com/dotnet/runtimelab/pull/1547/files#diff-a3647ce913fdcfbfdfec36e888f7313551577a5b6f1ecf313da00d9471336003R218
But the problem in this issue is that the test is passing on Windows, Linux, and macOS... it's just failing for some inputs on iOS and Android.

@veanes
Copy link
Contributor

veanes commented Oct 20, 2021

Oh, I see. So the test itself is in some sense correct here actually.

@steveisok
Copy link
Member Author

I don't doubt the test itself is correct.

If these failures were just isolated to Android, I wouldn't have even opened an issue as a great deal of tests with tr-TR culture produce different results. iOS has not had that problem, which leads me to believe there may be some bug lurking.

@stephentoub
Copy link
Member

stephentoub commented Oct 20, 2021

@steveisok, do you want us to disable the test for now for Android/iOS?

@steveisok
Copy link
Member Author

That's ok. I have a PR pending that will skip it.

@stephentoub stephentoub removed the untriaged New issue has not been triaged by the area owner label Oct 31, 2021
@stephentoub stephentoub added this to the 7.0.0 milestone Oct 31, 2021
@stephentoub
Copy link
Member

@joperezr, was this addressed by your IgnoreCase change?

@joperezr
Copy link
Member

joperezr commented Apr 6, 2022

good question, not clear. I haven't ran the iOS/tvOS tests locally before but I'll check by re-adding the test and running against Helix.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Apr 8, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants