RFR (XS): 8066670 - PrintSharedArchiveAndExit does not exit the VM when the archive is invalid
Calvin Cheung
calvin.cheung at oracle.com
Thu Dec 4 18:02:20 UTC 2014
Hi Ioi,
The fix looks good.
For the testcase, I'm wondering if it's possible to start only one java
process for each scenario by calling output.shouldNotContain() twice.
For (1) With a valid archive for example:
pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./sample.jsa",
"-XX:+PrintSharedArchiveAndExit", "-version");
output = new OutputAnalyzer(pb.start());
output.shouldContain("archive is valid");
output.shouldNotContain("Java HotSpot(TM)"); // Should not
print JVM version
output.shouldNotContain("Usage:"); // Should not
print JVM help message
output.shouldHaveExitValue(0); // Should report
success in error code.
thanks,
Calvin
On 12/4/2014 2:32 AM, Ioi Lam wrote:
> Hi Folks,
>
> Please review a small fix:
>
> https://bugs.openjdk.java.net/browse/JDK-8066670
> http://cr.openjdk.java.net/~iklam/8066670-PrintSharedArchiveAndExit/
>
> Summary of fix:
>
> Do not set UseSharedSpaces to falseif PrintSharedArchiveAndExit is
> enabled.
>
> After this fix, the JVM correctly exits when
> PrintSharedArchiveAndExit is enabled
> and an invalid archive is encountered.
>
> New test cases are in closed source code.
>
> Tests:
>
> JPRT
> JTREG
>
>
>
More information about the hotspot-runtime-dev
mailing list