RFR: 8283606: Tests may fail with zh locale on MacOS

Vikey Chen duke at openjdk.java.net
Thu Mar 24 17:13:43 UTC 2022


On Thu, 24 Mar 2022 14:06:03 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> I have run tier-1 test with  `JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"`, some tests still fail because of default locale, Most of them are langtools tests. 
>> 
>> On MacOS 12.1.
>
> Can you look into why these tests do not fail on other OS's with the same locale?
> There could be some other way that the locale defaults are used by the tests.

@RogerRiggs I haven't tested on other OS's, I will try to take some time to test it.

from the test doc of openjdk
> If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting LANG="en_US" in the environment before running tests should work. On Windows or MacOS, setting JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" helps for most, but not all test cases.

Maybe in linux setting environment before test is enough. At first, I have set `LC_ALL` and `LANG` on MAC, which is not work.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7924


More information about the compiler-dev mailing list