United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7194035 update tests for upcoming changes for jtreg
JDK-7194035 : update tests for upcoming changes for jtreg

Details
Type:
Enhancement
Submit Date:
2012-08-24
Status:
Resolved
Updated Date:
2013-12-17
Project Name:
JDK
Resolved Date:
2012-09-05
Component:
core-svc
OS:
generic
Sub-Component:
tools
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
Currently, jtreg incorrectly confuses the concept of the /directory/ in which the test's class will be written with the /classpath/ used to locate all of the test's classes, including any library classes.  It provides env variable TESTCLASSES and system property test.classes, and tests use these to mean both a directory and a classpath.

jtreg will be fixed to separate the two concepts, such that TESTCLASSES/test.classes will continue to mean the /directory/ in which the test's class will the written, and will introduce TESTCLASSPATH/test.class.path for the classpath used to locate all the test's classes.

This change only affects a small number of tests, which use both @library and TESTCLASSES. A number of serviceability tests are affected, 
FAILED: sun/tools/jcmd/jcmd-big-script.sh
FAILED: sun/tools/jcmd/jcmd-f.sh
FAILED: sun/tools/jcmd/jcmd-help-help.sh
FAILED: sun/tools/jcmd/jcmd-pid.sh
FAILED: sun/tools/jinfo/Basic.sh
FAILED: sun/tools/jmap/Basic.sh
FAILED: sun/tools/jps/jps-m_2.sh
FAILED: sun/tools/jps/jps-Vvml_2.sh
FAILED: sun/tools/jstack/Basic.sh
However, all the failures are caused by issues in shared library code, meaning that only that code needs to be updated.

                                    

Comments
SUGGESTED FIX

The fix is to update the tests where they are using TESTCLASSES/test.classes as a classpath.

To ease migration onto the new jtreg, it is suggested that the tests check to see if the new variables are defined (i.e. new jtreg) and to fall back on the old variables if they are not defined (i.e. old jtreg). In shell terms, this can be written
	${TESTCLASSPATH:-${TESTCLASSES}}
                                     
2012-08-24
EVALUATION

Yes
                                     
2012-08-28



Hardware and Software, Engineered to Work Together