8044818: [TESTBUG] runtime/CDSCompressedKPtrs/XShareAuto.java fails with RuntimeException 'sharing' found in stderr

Reviewed-by: hseigel, lfoltan, coleenp, dholmes
This commit is contained in:
Pavel Chistyakov 2014-06-22 21:23:32 -04:00 committed by David Holmes
parent abce44ab84
commit d9a2dbc73b

View File

@ -44,8 +44,16 @@ public class XShareAuto {
"-server", "-XX:+UnlockDiagnosticVMOptions",
"-XX:SharedArchiveFile=./sample.jsa", "-version");
output = new OutputAnalyzer(pb.start());
output.shouldNotContain("sharing");
output.shouldHaveExitValue(0);
// We asked for server but it could be aliased to something else
if (output.getOutput().contains("Server VM")) {
// In server case we don't expect to see sharing flag
output.shouldNotContain("sharing");
output.shouldHaveExitValue(0);
}
else {
System.out.println("Skipping test - no Server VM available");
return;
}
pb = ProcessTools.createJavaProcessBuilder(
"-server", "-Xshare:auto", "-XX:+UnlockDiagnosticVMOptions",