write to testbase dir [TEST_BUG] javax/xml/jaxp/parsers/8022548/XOMParserTest.java failed when testbase dir has read only permissions

Alan Bateman Alan.Bateman at oracle.com
Thu Oct 3 05:44:39 UTC 2013


On 02/10/2013 13:43, huizhe wang wrote:
> Not sure if this question has been asked before. But is it a general 
> rule that no data should be written to the testbase dir?
>
> This test (javax/xml/jaxp/parsers/8022548/XOMParserTest.java) does a 
> transform that writes result to "test.src". From the bug report, it 
> gets an Access is denied error on Windows.
>
> Is the fix replacing "test.src" with "test.classes" as Daniel suggested?
Right, tests shouldn't be writing to test.src. jtreg runs tests with a 
working directory where you can create temporary files so you don't have 
to specify a directory. The temporary file directory is another choice 
although not always the best choice as you can fill that up easily and 
also it's not easy to find the  files after a test failure. Another 
useful thing to know is that there are jtreg options to retain the files 
in the working directory when a test fails.

-Alan



More information about the core-libs-dev mailing list