jps fix and test exclude list for jdk-module-image

Mandy Chung mandy.chung at oracle.com
Tue Jan 11 16:13:22 PST 2011


  I am taking a pass at the regression test failures when running with 
jdk-module-image.  My goal is to get all the test targets in a JPRT job 
to succeed with modules build (i.e. testing jdk-module-image) so that we 
can easily identify regressions with the jigsaw development and also 
with the periodic update with jdk 7 repositories.

First batch of changes:
    http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/jps-module-fix/

Summary of changes:
1. Add jdk_jigsaw in the jprt testset.
2. Add regression test failures in jdk/test/ModulesProblemList.txt to 
temporarily exclude them until the bugs are fixed.
3. Some minor cleanup in the class analyzer tool
4. Fix jps to print the correct information (main change in this webrev) 
and details below.

A number of jps unit tests failed because jps (and a number of other jdk 
tools) now is launched in module mode.  jps used to print the class name 
(e.g. sun.tools.jps.Jps).  In module mode, jps now prints the module 
name e.g. 'jdk.tools at 7-ea'.  The tests check if it shows jps itself by 
comparing the output.  Jps also truncates the package name to show the 
class name in a short form and thus it shows 'tools at 7-ea' rather than 
the full module name.

The fix involves changes in java launcher, hotspot VM and jps.
1. the java launcher will pass -Dsun.java.main to the VM.  This property 
will be either the main class name or the module name being launched.
2. the VM adds two new jvmstat counters (sun.rt.javaMain and 
sun.rt.javaModule).
3. If an application is running in module mode (ie. non-empty 
sun.rt.javaModule), then jps will print the full module name even for 
the short form.  jps -l option prints the long form that will show the 
full path of a class name.
4. If the application is a jdk tool (e.g. jps and jstat), it launches 
the 'jdk.tools' module and pass the main class name as the first 
argument [1] (that is the current workaround for multi entry point 
support).  It's not as useful if jps just shows 'jdk.tools'.  So in this 
case, jps will print the main class name of the tool instead of the 
module name.

There is a jps RFE to support printing the classname of an applet or a 
webstart application.  The -Dsun.java.main property can be extended for 
this purpose in the future.

With the above changes, langtools_jtreg and jdk_jigsaw are the remaining 
test targets with failures.
    langtools_jtreg has about 8 failures
    jdk_jigsaw tests depend on gawk and cc compiler.  I'll ask if we can 
get help to install gawk on all JPRT systems and deal with the 
compilation of the native library next.

Anyone has cycle to review this?

Mandy

[1] 
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2010-September/001118.html




More information about the jigsaw-dev mailing list