Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GetUnicode_Invalid/GetAscii_Invalid test failures on Fedora 40 #100287

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

Closed
tmds opened this issue Mar 26, 2024 · 7 comments · Fixed by #105282
Closed

GetUnicode_Invalid/GetAscii_Invalid test failures on Fedora 40 #100287

tmds opened this issue Mar 26, 2024 · 7 comments · Fixed by #105282

Comments

@tmds
Copy link
Member

tmds commented Mar 26, 2024

Some System.Globalization.Extensions.Tests tests are failing on Fedora 40.
Fedora 40 has libicu 74.2-1.

  • GetUnicode_Invalid: 158 out of 5421 failed
  • GetAscii_Invalid: 158 out of 5448 failed

See testResults.xml.txt

cc @tarekgh @omajid

Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Mar 26, 2024
@tarekgh tarekgh added this to the 9.0.0 milestone Mar 26, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Mar 26, 2024
@tmds
Copy link
Member Author

tmds commented Jul 12, 2024

@tarekgh do you know what the root cause is for the test failures?

Here is one of the cases that fails:

Error: Expected IdnMapping.GetAscii("\u226E\uD835\uDFD5\uFF0E\u8B16Ss\u226F") to throw an ArgumentException. Line Number: 5448 [/var/home/tmds/repos/runtime/src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/System.Globalization.Extensions.Tests.csproj]
/var/home/tmds/repos/runtime/src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/IdnMappingIdnaConformanceTests.cs(88): error VSTEST1: [5251]: Item:  Unicode_13_0_IdnaTest { ASCIIResult = ConformanceIdnaTestResult { ResultType = ToAscii, StatusValue = "[B2, B3, B6, V6]", Success = False, Value = "xn----ufo9661d.xn--r5gy929fhm4f" }, LineNumber = 6126, Source = "xn----ufo9661d.xn--r5gy929fhm4f", Type = Nontransitional, UnicodeResult = ConformanceIdnaUnicodeTestResult { ResultType = ToUnicode, StatusValue = "[B2, B3, B6, V6]", Success = False, ValidDomainName = True, Value = "ꡣ-≠.𞤹𐅢ↄ" } }

@tarekgh
Copy link
Member

tarekgh commented Jul 12, 2024

This test depends on the Unicode IDN data which changes with every new version. Look at https://github.com/dotnet/runtime/tree/main/src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/Data/Unicode_11_0 as example. To fix this, we'll need to pick a new data and tweak it a little to make it pass.

@omajid
Copy link
Member

omajid commented Jul 22, 2024

Looks like libicu 74 uses Unicode 15.1: https://icu.unicode.org/download/74. I can look into adding this.

Do we also need to explicitly add libicu 72/Unicode 15 support? Or libicu 70/Unicode 14 support?

@tarekgh
Copy link
Member

tarekgh commented Jul 22, 2024

@omajid we can add both versions to ensure using different ICU versions will work.

Please note, after porting the test data files, usually we comment some lines which are incompatible with our APIs. The best way to do that is just bring the data as it is, run the test, look at the failed entries and then we comment it. Thanks a lot for willing to help with that.

@omajid
Copy link
Member

omajid commented Jul 22, 2024

I just checked things and the tests don't fail on Fedora 39, which has icu 73. Maybe there's no interesting changes in Unicode 14 or 15 that are relevant for our test suite?

omajid added a commit to omajid/dotnet-runtime that referenced this issue Jul 22, 2024
The test file IdnaTest_15_1.txt is a direct copy of
https://www.unicode.org/Public/idna/15.1.0/IdnaTestV2.txt without any
further changes.

Fixes: dotnet#100287
omajid added a commit to omajid/dotnet-runtime that referenced this issue Jul 22, 2024
The test file IdnaTest_15_1.txt is a direct copy of
https://www.unicode.org/Public/idna/15.1.0/IdnaTestV2.txt without any
further changes.

Fixes: dotnet#100287
@tmds
Copy link
Member Author

tmds commented Jul 25, 2024

Thanks @omajid!

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2024
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.

3 participants