hotspot/test/compiler/startup/NumCompilerThreadsCheck.java
changeset 24338 bff6fc677861
parent 22913 d80017962061
child 29678 dd2f3932c21e
child 30110 20d4dc1409a6
--- a/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java	Tue Apr 29 12:20:53 2014 -0700
+++ b/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java	Fri May 02 06:24:39 2014 +0200
@@ -30,11 +30,28 @@
 import com.oracle.java.testlibrary.*;
 
 public class NumCompilerThreadsCheck {
+
   public static void main(String[] args) throws Exception {
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:CICompilerCount=-1");
     OutputAnalyzer out = new OutputAnalyzer(pb.start());
 
     String expectedOutput = "CICompilerCount of -1 is invalid";
     out.shouldContain(expectedOutput);
+
+    if (isZeroVm()) {
+      String expectedLowWaterMarkText = "must be at least 0";
+      out.shouldContain(expectedLowWaterMarkText);
+    }
+  }
+
+  private static boolean isZeroVm() {
+    String vmName = System.getProperty("java.vm.name");
+    if (vmName == null) {
+      throw new RuntimeException("No VM name");
+    }
+    if (vmName.toLowerCase().contains("zero")) {
+      return true;
+    }
+    return false;
   }
 }