8044818: [TESTBUG] runtime/CDSCompressedKPtrs/XShareAuto.java fails with RuntimeException 'sharing' found in stderr
Reviewed-by: hseigel, lfoltan, coleenp, dholmes
Contributed-by: Pavel Chistyakov <pavel.chistyakov@oracle.com>
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Wed Jun 18 12:35:32 2014 -0700
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java Sun Jun 22 21:23:32 2014 -0400
@@ -44,8 +44,16 @@
"-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",