JDK-8140189 : [TESTBUG] Get rid of "@library /../../test/lib" in jtreg tests
  • Type: Bug
  • Component: hotspot
  • Sub-Component: test
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-10-20
  • Updated: 2016-01-22
  • Resolved: 2015-10-30
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 9
9 b94Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
See CODETOOLS-7901527 for background and more details.

The use of "@library /../../test/lib" causes the directory "test/lib" to be created in the current directory. Also, any .java file located in /../../test/lib that is explicitly compiled with @build will also end up in this directory (implicitly compiled files do not).

The ../ notation in jtreg tests is generally discouraged, and support in jtreg has been added to make it so it is no longer necessary. Adding the following to TEST.ROOT:

    external.lib.roots = ../../

Makes it so now you can just use:

    * @library /test/lib

This bug is only meant to address the issue of files/directories being created outside the JTwork directory. It will not address all uses of ../, which are not problematic if they don't take you above the root of the test directory.