8064696: compiler/startup/SmallCodeCacheStartup.java doesn't check exit code
authoriignatyev
Fri, 21 Nov 2014 17:28:29 +0300
changeset 27702 57d2f1cacc26
parent 27701 c6b49b72dc61
child 27703 6524c73c4f07
child 27704 88c9f3b507ff
child 27911 2902ef631b81
8064696: compiler/startup/SmallCodeCacheStartup.java doesn't check exit code Reviewed-by: kvn, anoll, iignatyev Contributed-by: tatiana.pivovarova@oracle.com
hotspot/test/compiler/startup/SmallCodeCacheStartup.java
--- a/hotspot/test/compiler/startup/SmallCodeCacheStartup.java	Fri Nov 21 17:27:11 2014 +0300
+++ b/hotspot/test/compiler/startup/SmallCodeCacheStartup.java	Fri Nov 21 17:28:29 2014 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,14 +33,13 @@
 
 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) {}
+                                                                "-version");
+      OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+      analyzer.shouldHaveExitValue(0);
 
-    System.out.println("TEST PASSED");
+      System.out.println("TEST PASSED");
   }
 }