JDK-8006039 : test/tools/launcher/I18NJarTest.java fails on Mac w/ LANG=C, LC_ALL=C
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2013-01-10
  • Updated: 2013-09-04
  • Resolved: 2013-02-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b82Fixed
Related Reports
Relates :  
Relates :  
Description
The tools/launcher/I18NJarTest.java test now fails on Mac when the LANG & LC_ALL env vars are set to 'C'.  (Most Macs I've used default to LANG=en_US.UTF-8 and LC_ALL unset).

The error stack trace is:
----------System.err:(13/687)----------
java.lang.RuntimeException: TEST FAILED
	at I18NJarTest.main(I18NJarTest.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:477)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

More than likely, this was introduced by 8003228.

Comments
I think the test should also check the LANG & LC_ALL env vars, and go back to "fake passing" the test if either is set to 'C'. This would allow the test to continue to run for real in the default Mac environment (LANG=en_US.UTF-8), and stop the test from failing under LANG=C on Mac. Webrev is here: http://cr.openjdk.java.net/~bchristi/8006039/webrev.00/
22-02-2013

Added sqebug label to match the bug with the test failure visible in our nightly results.
22-01-2013

And also per the comment: * Note 1: the system must have the correct Locale, in order for the test to * work correctly, on those systems that do not comply, the test will succeed. * Here are some guidelines to set the locale correctly. ... * On Unix: use "locale -a" verify one of these exist ja_JP.UTF-8 or * ja_JP.utf8 or ja_JP.ujis, and export one of them with LC_ALL. Thought the test does not check the value of LC_ALL, just sun.jnu.encoding.
18-01-2013

Although the test would "pass" in the C locale prior to 8003228, it wasn't really testing the intended functionality. Per the output: "Warning: current encoding is US-ASCIIthis test requires MS932 <Ja> or UTF-8, test passes vacuosly"
17-01-2013