RFR (XS): 8066670 - PrintSharedArchiveAndExit does not exit the VM when the archive is invalid
calvin.cheung at oracle.com
Thu Dec 4 20:41:36 UTC 2014
Oops... I missed the "-version" part.
Looks good to me.
On 12/4/2014 10:39 AM, Ioi Lam wrote:
> Hi Calvin,
> Without the -XX:+PrintSharedArchiveAndExit switch:
> * The -version switch would trigger "Java HotSpot(TM) version ...." in
> the output
> * Without -version, the usage info "Usage: ..." would be printed
> Since the two output are mutually exclusive, I decided to put them in
> two separate test cases.
> - Ioi
> On 12/4/14, 10:02 AM, Calvin Cheung wrote:
>> 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()
>> For (1) With a valid archive for example:
>> pb = ProcessTools.createJavaProcessBuilder(
>> "-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.
>> On 12/4/2014 2:32 AM, Ioi Lam wrote:
>>> Hi Folks,
>>> Please review a small fix:
>>> Summary of fix:
>>> Do not set UseSharedSpaces to falseif PrintSharedArchiveAndExit is
>>> 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.
More information about the hotspot-runtime-dev