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
@tarekgh
Copy link
Member

tarekgh commented Dec 7, 2024

/backport to release/8.0-staging

@github-actions github-actions bot unlocked this conversation Dec 7, 2024
Copy link
Contributor

github-actions bot commented Dec 7, 2024

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/12209500472

Copy link
Contributor

github-actions bot commented Dec 7, 2024

@tarekgh backporting to release/8.0-staging failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix System.Globalization.Extensions.Tests for icu 74/unicode 15.1
.git/rebase-apply/patch:533: trailing whitespace.
\u200D; ; [C2]; xn--1ug; ; ; [A4_2] # 
.git/rebase-apply/patch:534: trailing whitespace.
; ; [X4_2]; ; [A4_2]; ;  # 
.git/rebase-apply/patch:535: trailing whitespace.
xn--1ug; \u200D; [C2]; xn--1ug; ; ;  # 
.git/rebase-apply/patch:540: trailing whitespace.
\u200C; ; [C1]; xn--0ug; ; ; [A4_2] # 
.git/rebase-apply/patch:541: trailing whitespace.
xn--0ug; \u200C; [C1]; xn--0ug; ; ;  # 
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Using index info to reconstruct a base tree...
A	src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/Data/Factory.cs
A	src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/NlsTests/System.Globalization.Extensions.Nls.Tests.csproj
A	src/libraries/System.Runtime/tests/System.Globalization.Extensions.Tests/System.Globalization.Extensions.Tests.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Globalization.Extensions/tests/IdnMapping/Data/Factory.cs
CONFLICT (content): Merge conflict in src/libraries/System.Globalization.Extensions/tests/IdnMapping/Data/Factory.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fix System.Globalization.Extensions.Tests for icu 74/unicode 15.1
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 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