changeset 7443:9e340d8c1aec

8064696: compiler/startup/SmallCodeCacheStartup.java doesn't check exit code Reviewed-by: kvn, anoll, iignatyev Contributed-by: tatiana.pivovarova@oracle.com
author iignatyev
date Fri, 21 Nov 2014 17:28:29 +0300
parents 5b4a65809a63
children 0b00b05f1ce3 2aa1a6c41461 e264efbf19f8
files test/compiler/startup/SmallCodeCacheStartup.java
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/startup/SmallCodeCacheStartup.java	Fri Nov 21 17:27:11 2014 +0300
+++ b/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");
   }
 }