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

[apple] Failure in System.Globalization.Tests.StringNormalizationTests.Normalize tests #110720

Closed
BrzVlad opened this issue Dec 15, 2024 · 5 comments · Fixed by #110723
Closed
Assignees
Labels
area-System.Globalization disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged os-ios Apple iOS
Milestone

Comments

@BrzVlad
Copy link
Member

BrzVlad commented Dec 15, 2024

This happens in test suites: System.Globalization.Extensions.iOS.Tests and System.Globalization.Extensions.Tests
It impacts all apple lanes. Other configs not affected. Fails on maccatalyst_x64, maccatalyst_arm64, iossimulator_x64, ios-arm64.

Sample failure:

[FAIL] System.Globalization.Tests.StringNormalizationTests.Normalize(value: "ÄÇ", normalizationForm: FormC, expected: "ÄÇ")
[04:39:50.5756830] Assert.Equal() Failure: Values differ
[04:39:50.5756940] Expected: 2
[04:39:50.5757040] Actual:   0
[04:39:50.5757150] 2024-12-15 01:39:50.661 System.Globalization.Extensions.iOS.Tests[94400:124587059]    at System.Globalization.Tests.StringNormalizationTests.Normalize(String value, NormalizationForm normalizationForm, String expected)
[04:39:50.5757500]    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
[04:39:50.5757630] 2024-12-15 01:39:50.661 System.Globalization.Extensions.iOS.Tests[94400:124587059]    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
[04:39:50.5822700] 2024-12-15 01:39:50.668 System.Globalization.Extensions.iOS.Tests[94400:124587059] 

Regressed recently. Most likely caused by a5af0ab

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 15, 2024
@BrzVlad
Copy link
Member Author

BrzVlad commented Dec 15, 2024

@tarekgh Any idea what is going on and how the fix should look like ?

@tarekgh
Copy link
Member

tarekgh commented Dec 15, 2024

@BrzVlad could you please disable the failing test against an active issue till we investigate?

CC @matouskozak if he can help till, I am back?

I have some suspicion GetNormalizedLength is not returning the correct result on iOS (or similar platforms)


Assert.Equal(expected.Length, value.AsSpan().GetNormalizedLength(normalizationForm));

@tarekgh
Copy link
Member

tarekgh commented Dec 15, 2024

I think I understand what the problem is.

The following line expect returning the right length:

realLen = Interop.Globalization.NormalizeStringNative(normalizationForm, pInput, source.Length, null, 0);

while the iOS implementation doesn't allow empty buffers while it should do (as other platform implementations do).

if (normalizedString == NULL || normalizedString.length == 0)

@BrzVlad I'll try to fix this at first chance. I would appreciate it if you could disable the test against active issue till, I fix it. Sorry for the inconvenience,

@tarekgh tarekgh added this to the 10.0.0 milestone Dec 15, 2024
@tarekgh tarekgh self-assigned this Dec 15, 2024
@tarekgh tarekgh removed the untriaged New issue has not been triaged by the area owner label Dec 15, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Dec 15, 2024
@tarekgh
Copy link
Member

tarekgh commented Dec 15, 2024

I opened the PR #110723. I didn't test it because I don't have the environment setup, but I believe it will fix the issue.

@BrzVlad
Copy link
Member Author

BrzVlad commented Dec 16, 2024

@tarekgh Doesn't seem like the PR is fixing the tests. Will disable the test until you have more time to investigate. #110725.

cc @ivanpovazan

@matouskozak matouskozak added the disabled-test The test is disabled in source code against the issue label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Globalization disabled-test The test is disabled in source code against the issue in-pr There is an active PR which will close this issue when it is merged os-ios Apple iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants