--- a/hotspot/test/compiler/startup/StartupOutput.java Mon Aug 15 14:08:01 2016 -0700
+++ b/hotspot/test/compiler/startup/StartupOutput.java Wed Aug 17 08:19:06 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8026949
+ * @bug 8026949 8164091
* @summary Test ensures correct VM output during startup
* @library /testlibrary
* @modules java.base/jdk.internal.misc
@@ -45,7 +45,14 @@
pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:+DisplayVMOutputToStdout", "-version");
out = new OutputAnalyzer(pb.start());
out.shouldNotContain("no space to run compilers");
+ out.shouldHaveExitValue(0);
- out.shouldHaveExitValue(0);
+ pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:ReservedCodeCacheSize=1770K", "-XX:InitialCodeCacheSize=4K", "-version");
+ out = new OutputAnalyzer(pb.start());
+ // The VM should not crash but may return an error message because we don't have enough space for adapters
+ int exitCode = out.getExitValue();
+ if (exitCode != 1 && exitCode != 0) {
+ throw new Exception("VM crashed with exit code " + exitCode);
+ }
}
}