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

consider running all libraries unit tests with bogus machine culture #92949

Open
danmoseley opened this issue Oct 3, 2023 · 9 comments
Open
Assignees
Labels
area-Meta test-enhancement Improvements of test source code
Milestone

Comments

@danmoseley
Copy link
Member

danmoseley commented Oct 3, 2023

#92924 (comment)

This was a case where the product was not using invariant culture to parse a date.

It's probably worth having a look to see whether any unit tests throw up similar issues. We do run at least inner loop on es-ES in CI I believe. But I'm not sure this includes outerloop, and es-ES is sufficiently similar to en-US that it does not catch certain kinds of issues (eg., historically we've had several tests failed in Russian machine culture, and they were community reported)

suggestion: run all the unit tests including outer loop in a different culture, ideally with a different calendar, etc. or even a custom culture that is different to neutral culture in every respect -- calendar, date format, numeric specifier, etc. Every test should pass.

I've done this historically from time to time but I'll put this up for grabs this time

cc @filipnavara

@danmoseley danmoseley added area-Meta help wanted [up-for-grabs] Good issue for external contributors labels Oct 3, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 3, 2023
@ghost
Copy link

ghost commented Oct 3, 2023

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

Issue Details

#92924 (comment)

This was a case where the product was not using invariant culture to parse a date.

It's probably worth having a look to see whether any unit tests throw up similar issues. We do run at least inner loop on es-ES in CI I believe. But I'm not sure this includes outerloop, and es-ES is sufficiently similar to en-US that it does not catch certain kinds of issues (eg., historically we've had several tests failed in Russian machine culture, and they were community reported)

suggestion: run all the unit tests including outer loop in a different culture, ideally with a different calendar, etc. or even a custom culture that is different to neutral culture in every respect -- calendar, date format, numeric specifier, etc.

I've done this historically from time to time but I'll put this up for grabs this time

cc @filipnavara

Author: danmoseley
Assignees: -
Labels:

area-Meta, help wanted

Milestone: -

@danmoseley
Copy link
Member Author

@filipnavara sounded like you might do this at some point? or up for grabs?

@filipnavara
Copy link
Member

It's not exactly on the top of my list but I do have a machine with such a weird setup so I will likely eventually get to do it. Feel free to assign me.

@danmoseley danmoseley removed the help wanted [up-for-grabs] Good issue for external contributors label Oct 3, 2023
@danmoseley
Copy link
Member Author

Cool - done. I wasn't expecting, just sounded like you planned to 😀

@MichalPetryka
Copy link
Contributor

MichalPetryka commented Oct 4, 2023

ideally with a different calendar

I'd say that cultures with a comma or the arabic ٫ would be the most important. We've had one 3rd party library fail with double parsing but ONLY on Czech culture once.

I think that having a weekly pipeline for running with a few weird cultures would be the solution here (like Czech, Arabic, Thai, Japanese).

@filipnavara
Copy link
Member

I run all the inner loop tests on macOS Sonoma with the Saudi Arabian culture with non-Gregorian calendar. There were no additional culture-related failures. There was one spurious failure in System.Net.Http.Functional.Tests.HttpMetricsTest_Http11_Async.RequestDuration_ConnectionClosedWhileReceivingHeaders_Recorded, and the OpenSSL and ODBC tests were skipped due to lack of native libraries.

@ericstj ericstj added this to the 9.0.0 milestone Oct 10, 2023
@ericstj ericstj added test-enhancement Improvements of test source code and removed untriaged New issue has not been triaged by the area owner labels Oct 10, 2023
@ericstj
Copy link
Member

ericstj commented Oct 10, 2023

@dotnet/area-system-globalization @dotnet/area-infrastructure-libraries to weigh in on this.

@tarekgh
Copy link
Member

tarekgh commented Oct 10, 2023

Running the libraries tests with random culture is a good idea. We can think of having a CI leg which can force a random culture on the machine before running.

@danmoseley
Copy link
Member Author

As a simple step we could consider replacing our regular en-ES run (I assume we still do) with one using a culture that has more differences to en-US. OS culture also changes things like OS messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta test-enhancement Improvements of test source code
Projects
None yet
Development

No branches or pull requests

5 participants