hotspot/test/compiler/startup/SmallCodeCacheStartup.java
changeset 27420 04e6f914cce1
parent 22918 1c22d2094420
child 27702 57d2f1cacc26
--- a/hotspot/test/compiler/startup/SmallCodeCacheStartup.java	Fri Oct 24 08:35:29 2014 +0200
+++ b/hotspot/test/compiler/startup/SmallCodeCacheStartup.java	Fri Oct 24 14:25:46 2014 +0200
@@ -27,10 +27,20 @@
  * @summary Test ensures that there is no crash if there is not enough ReservedCodeacacheSize
  *          to initialize all compiler threads. The option -Xcomp gives the VM more time to
  *          to trigger the old bug.
- * @run main/othervm -XX:ReservedCodeCacheSize=3m -XX:CICompilerCount=64 -Xcomp SmallCodeCacheStartup
+ * @library /testlibrary
  */
+import com.oracle.java.testlibrary.*;
+
 public class SmallCodeCacheStartup {
   public static void main(String[] args) throws Exception {
+    try {
+      ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m",
+                                                                "-XX:CICompilerCount=64",
+                                                                "-Xcomp",
+                                                                "SmallCodeCacheStartup");
+      pb.start();
+    } catch (VirtualMachineError e) {}
+
     System.out.println("TEST PASSED");
   }
 }