changeset 25332:de966f7475d6

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>
author dholmes
date Sun, 22 Jun 2014 21:23:32 -0400
parents 59a7d98a5268
children 078d0ef28601
files hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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",