Runtime: Uri test fails on iOS

Created on 22 May 2020  路  18Comments  路  Source: dotnet/runtime

One test is failing from System.Private on iOS

  • [ ] System.PrivateUri.Tests.UriTests.TestCompare
<test name="System.PrivateUri.Tests.UriTests.TestCompare" type="System.PrivateUri.Tests.UriTests" method="TestCompare" time="0.0149457" result="Fail">
  <failure exception-type="Xunit.Sdk.EqualException">
    <message><![CDATA[Assert.Equal() Failure\nExpected: -65\nActual:   -1]]></message>
    <stack-trace><![CDATA[   at System.PrivateUri.Tests.UriTests.TestCompare() in /Users/mdhwang/runtime/src/libraries/System.Private.Uri/tests/FunctionalTests/UriTests.cs:line 550
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /Users/mdhwang/runtime/src/mono/netcore/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 359]]></stack-trace>
  </failure>
</test>
area-System.Net os-ios

Most helpful comment

Sorry for the noise/confusion. As per email I sent a couple weeks back, please ignore all issues for os-iOS, os-Android, and os-tvOS for now. Folks in the Mono team, and @safern, are working on getting this test pass rate up. In this case, it is very likely just one fallout of a larger problem with ICU on iOS.

All 18 comments

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@MihaZupan

may be lack of globalization. https://github.com/dotnet/runtime/issues/33652
There are other networking (and other tests) failing when using unicode or culture.

This test should come down to
c# string.Compare( "http://www.contoso.com/path?name#frag", "http://www.contosooo.com/pathname#slag", StringComparison.CurrentCulture)
So a globalization issue as Tomas suggested

Tagging subscribers to this area: @tarekgh, @safern, @krwq
Notify danmosemsft if you want to be subscribed.

OK, adjusting label to match responsibility.

@MihaZupan does this issue repo only on iOS? and succeed on other platforms? why the test is using the current culture for the uri comparison? I am seeing you can have this assumption to all cultures return the exact same string comparing results. I am seeing this is a test issue more than the Globalization issue.
if you need more help with it, please send the current culture value and we can confirm this is by design for Globalization.

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

I haven't seen this test come up before. There's also no reason for it to use CurrentCulture - we can fix that in the test.

I don't know under which culture this was triggered, @mdh1418 do you have a way to obtain that information? It does not fail under any installed culture on my Windows machine.

I would say do a quick try to change current culture to CultureInfo.InvariantCulture and look if the test fail at that time.

string.Compare for these values under InvariantCulture returns -1 as expected by the test

I don't have a way to test if the behavior is any different on iOS specifically

I don't have a way to test if the behavior is any different on iOS specifically

just get the current culture from the iOS (using CultureInfo.CurrentCulture) and then use the exact same culture in other platforms and look at what you will get from the test result.

I think there might be a misunderstanding here - I did not run these tests.

Afaik iOS is not available in Helix yet for me to be able to repro this.

I think there might be a misunderstanding here - I did not run these tests.

no misunderstanding, we need just ask @mdh1418 to get the needed info from iOS run as he is the one reported the issue.

Yeah, there is no helix iOS runs yet. We're just opening issues at the moment to be able to disable them, get clean runs and then be able to enable helix runs.

I have setup where I can run iOS tests @MihaZupan. I droped investigations since it did not seems high priority for .NET 5. There seems to be fair amount of test failing around string processing in various test sets. I can give it try with the proposed change later this week so we get at least some insight.

Sorry for the noise/confusion. As per email I sent a couple weeks back, please ignore all issues for os-iOS, os-Android, and os-tvOS for now. Folks in the Mono team, and @safern, are working on getting this test pass rate up. In this case, it is very likely just one fallout of a larger problem with ICU on iOS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

btecu picture btecu  路  3Comments

Timovzl picture Timovzl  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments

jchannon picture jchannon  路  3Comments

nalywa picture nalywa  路  3Comments