RFR(S): 8011898: gc/TestVerifyBeforeGCDuringStartup.java: java.lang.RuntimeException
John Cuthbertson
john.cuthbertson at oracle.com
Wed Apr 24 00:15:57 UTC 2013
Hi Everyone,
Can I have a couple of volunteers review these changes to the regression
test I added for 8010463 and changed for 8011343? The webrev can found
at: http://cr.openjdk.java.net/~johnc/8011898/webrev.0/
Summary:
The call to System.getProperty("test.vm.opts") will return null if no
additional vm or java options are passed into jtreg. Hence the first
entry in the String array, that is passed to createJavaProcessBuilder(),
is null. When the null is converted to options, the first option will be
the empty string which the java launcher interprets as the name of the
main class.
Many thanks to Bengt for his diagnosis.
Notes:
In this test I'm using the same mechanism as in Tao's test for 6761744.
His is much nicer than what I came up with. Many tanks to Tao.
The test now reads the test.java.opts instead of test.vm.opts after
feedback from SQE.
Also I added a couple of prints to test to make it easier to see what
the command line of the child java process actually is and it's
resulting output. In the .jtr file you see something like:
> ----------messages:(3/144)----------
> command: main TestVerifyDuringStartup
> reason: Assumed action based on file name: run main
> TestVerifyDuringStartup
> elapsed time (seconds): 0.32
> ----------System.out:(8/408)----------
> Testing:
> /export/jdk8-1/solaris-x64/bin/java -XX:+UseG1GC -XX:-UseTLAB
> -XX:+UnlockDiagnosticVMOptions -XX:+VerifyDuringStartup -version
> Output:
> [Verifying threads Roots HeapRegionSets HeapRegions RemSet syms strs
> zone dict metaspace chunks hand C-heap code cache ]
> java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b58)
> Java HotSpot(TM) Server VM (build 25.0-b29-internal, mixed mode)
>
> ----------System.err:(1/15)----------
> STATUS:Passed.
> result: Passed. Execution successful
Thanks,
JohnC
More information about the hotspot-gc-dev
mailing list