JDK-6863624 : java/util/Currency/PropertiesTest.sh writable check is incorrect
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2008
  • CPU: generic
  • Submitted: 2009-07-23
  • Updated: 2016-02-12
  • Resolved: 2013-06-21
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 8
8 b98Fixed
Related Reports
Relates :  
Relates :  
Description
Test
	java/util/Currency/PropertiesTest.sh
fails on windows due writing on network drive with:

cp: Error copying file C:/local/common/testbase/jtreg/UTIL_REGRESSION/test/java/util/Currency/currency.properties to K:/jdk/re/7/promoted/ea/b65/binaries/windows-i586/jre/lib/currency.properties: Access is denied. 
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: K:\\jdk\\re\\7\\promoted\\ea\\b65\\binaries\\windows-i586\\jre\\lib\\currency.properties (The system cannot find the file specified)
	at PropertiesTest.compare(PropertiesTest.java:111)
	at PropertiesTest.main(PropertiesTest.java:42)
Caused by: java.io.FileNotFoundException: K:\\jdk\\re\\7\\promoted\\ea\\b65\\binaries\\windows-i586\\jre\\lib\\currency.properties (The system cannot find the file specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at java.io.FileInputStream.<init>(FileInputStream.java:96)
	at java.io.FileReader.<init>(FileReader.java:58)
	at PropertiesTest.compare(PropertiesTest.java:109)
	... 1 more

Comments
Testing key: JP, val: JPZ,123,2... AfterVal is : null Exception in thread "main" java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1237) at java.util.regex.Matcher.reset(Matcher.java:308) at java.util.regex.Matcher.<init>(Matcher.java:228) at java.util.regex.Pattern.matcher(Pattern.java:1096) at PropertiesTest.compare(PropertiesTest.java:138) at PropertiesTest.main(PropertiesTest.java:34) 1 tests failed ----------System.err:(2/279)---------- cp: cannot create regular file `/export/local/common/jdk/baseline/linux-ppc/jre/lib/currency.properties': Permission denied + /export/local/common/jdk/baseline/linux-ppc/bin/java -cp /export/local/aurora/sandbox/results/workDir/classes/java/util/Currency PropertiesTest -d dump3 result: Failed. Execution failed: exit code 1 test result: Failed. Execution failed: exit code 1
16-01-2013

The test checks for a writable JDK using: if [ -w $TESTJAVA ] but the directory it needs to write to is $TESTJAVA/lib or $TESTJAVA/jre/lib, which is almost always read-only on our test machines. If a test machine happens to have the top-level $TESTJAVA writable, the shell script won't make a writable copy as needed. How about getting rid of the writable test and always making a private, writable copy of the JDK?
16-01-2013

EVALUATION Sometimes there are stale java processes, which prevent creation of local JDK copy. When this happens, tests use JDK on the networked drive (k:), which is read-only. This test attempts to write to the JDK directory (\jre\\lib\\currency.properties). Is it possible to rewrite this test so that it does not modify tested JDK?
16-10-2009

EVALUATION The 'analysis.html' page (the link is in the comments section) categorizes this failure as a "new failure". Does it mean this is a regression? The shell script has not been modified for more than a year or two. BTW, I tried to rdesktop to the specified machine (vmsqe-core2q-28) but it required a password, so I am not able to login.
27-07-2009