-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
Tagging subscribers to this area: @dotnet/area-system-globalization |
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
....Runtime/tests/System.Globalization.Extensions.Tests/IdnMapping/Data/Unicode_15_1/ReadMe.txt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/12209500472 |
@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! |
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