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

Fix System.Globalization.Extensions.Tests for icu 74/unicode 15.1 #105282

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

omajid
Copy link
Member

@omajid omajid commented 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.

The tests all pass for me, which is a bit surprising. I was expecting to have to make this change: https://github.com/dotnet/runtime/pull/37281/files#diff-7fa33f56158b96efd2781ca446ea660029e4b588b4ae788cd72800e461fee83a

Fixes: #100287

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 22, 2024
Copy link
Contributor

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

@omajid omajid requested a review from tarekgh July 22, 2024 21:33
@omajid omajid added the test-bug Problem in test source code (most likely) label Jul 22, 2024
@@ -17,6 +17,8 @@
Link="IdnMapping\Data\Unicode_11_0\Unicode_11_0_IdnaTest.cs" />
<Compile Include="..\IdnMapping\Data\Unicode_13_0\Unicode_13_0_IdnaTest.cs"
Link="IdnMapping\Data\Unicode_13_0\Unicode_13_0_IdnaTest.cs" />
<Compile Include="..\IdnMapping\Data\Unicode_13_0\Unicode_15_1_IdnaTest.cs"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13

15?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now. Any idea how I can exercise this test suite?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to manually run the test on a machine/container having ICU 74. I thought you already did that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Here's how I did it:

$ cd runtime
$ ./build.sh
$ cd src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/
$ ../../../../../dotnet.sh build /t:Test

That failed before the changes in the PR and passed after. However, that didn't fail even with the typo in this file, so I am wondering if there's more specific I need to do validate NlsTests and/or changes to this file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is not using ICU at all. It runs on NLS. It looks, NLS results are resilient to both v13 and v15. The original failure we are trying to fix is specific when using ICU. As long as the test pass when using ICU, that will be good enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, are you running on Windows?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, only Fedora 40 here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that explain it :-) NlsTests are Windows only tests that will not run on Fedora.

@tarekgh tarekgh added this to the 9.0.0 milestone Jul 22, 2024
Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @omajid. I added minor comments. LGTM, otherwise.

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
@tarekgh tarekgh merged commit d8a642f into dotnet:main Jul 23, 2024
84 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization community-contribution Indicates that the PR has been added by a community member test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GetUnicode_Invalid/GetAscii_Invalid test failures on Fedora 40
2 participants