RFR(S): 8011898: gc/TestVerifyBeforeGCDuringStartup.java: java.lang.RuntimeException

John Cuthbertson john.cuthbertson at oracle.com
Thu Apr 25 17:01:46 UTC 2013


Hi Bengt,

Thanks for looking at the test.

I found the output very useful in confirming your diagnosis of the 
problem. Now imagine someone, who is not as familiar with ProcessBuilder 
as you, would it help them?

Personally I don't have a strong opinion either way - but if I can do 
something so minor now that might save a bit of time later on then why not?

JohnC

On 4/24/2013 11:33 PM, Bengt Rutisson wrote:
>
> Hi John,
>
> This looks good.
>
> A couple of questions:
>
> The test is pretty verbose. Do you really want to keep all the 
> System.out.print-ing?
>
>   51     System.out.print("Testing:\n" + 
> JDKToolFinder.getJDKTool("java"));
>   52     for (int i = 0; i < vmOpts.size(); i += 1) {
>   53       System.out.print(" " + vmOpts.get(i));
>   54     }
>   55     System.out.println();
>
>   61     System.out.println("Output:\n" + output.getOutput());
>
> If you remove the printing at line 51 I guess you can also remove the 
> import of JDKToolsFinder.
>
> Thanks,
> Bengt
>
>
> On 4/24/13 2:15 AM, John Cuthbertson wrote:
>> 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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20130425/d798af3c/attachment.htm>


More information about the hotspot-gc-dev mailing list