anoll@5919: /* anoll@5919: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. anoll@5919: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. anoll@5919: * anoll@5919: * This code is free software; you can redistribute it and/or modify it anoll@5919: * under the terms of the GNU General Public License version 2 only, as anoll@5919: * published by the Free Software Foundation. anoll@5919: * anoll@5919: * This code is distributed in the hope that it will be useful, but WITHOUT anoll@5919: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or anoll@5919: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License anoll@5919: * version 2 for more details (a copy is included in the LICENSE file that anoll@5919: * accompanied this code). anoll@5919: * anoll@5919: * You should have received a copy of the GNU General Public License version anoll@5919: * 2 along with this work; if not, write to the Free Software Foundation, anoll@5919: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. anoll@5919: * anoll@5919: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA anoll@5919: * or visit www.oracle.com if you need additional information or have any anoll@5919: * questions. anoll@5919: */ anoll@5919: anoll@5919: /* anoll@5919: * @test anoll@5919: * @bug 8023014 anoll@5919: * @summary Test ensures that there is no crash when compiler initialization fails anoll@5919: * @library /testlibrary anoll@5919: * anoll@5919: */ anoll@5919: import com.oracle.java.testlibrary.*; anoll@5919: anoll@5919: public class SmallCodeCacheStartup { anoll@5919: public static void main(String[] args) throws Exception { anoll@5919: ProcessBuilder pb; anoll@5919: OutputAnalyzer out; anoll@5919: anoll@5919: pb = ProcessTools.createJavaProcessBuilder("-XX:ReservedCodeCacheSize=3m", "-XX:CICompilerCount=64", "-version"); anoll@5919: out = new OutputAnalyzer(pb.start()); anoll@5919: out.shouldContain("no space to run compiler"); anoll@5919: out.shouldHaveExitValue(0); anoll@5919: } anoll@5919: }