test/runtime/6626217/Test6626217.sh

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 6198
55fb97c4c58d
child 6876
710a3c8b516e
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

acorn@2152 1 #
mikael@6198 2 # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
acorn@2152 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
acorn@2152 4 #
acorn@2152 5 # This code is free software; you can redistribute it and/or modify it
acorn@2152 6 # under the terms of the GNU General Public License version 2 only, as
acorn@2152 7 # published by the Free Software Foundation.
acorn@2152 8 #
acorn@2152 9 # This code is distributed in the hope that it will be useful, but WITHOUT
acorn@2152 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
acorn@2152 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
acorn@2152 12 # version 2 for more details (a copy is included in the LICENSE file that
acorn@2152 13 # accompanied this code).
acorn@2152 14 #
acorn@2152 15 # You should have received a copy of the GNU General Public License version
acorn@2152 16 # 2 along with this work; if not, write to the Free Software Foundation,
acorn@2152 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
acorn@2152 18 #
acorn@2152 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
acorn@2152 20 # or visit www.oracle.com if you need additional information or have any
acorn@2152 21 # questions.
acorn@2152 22 #
asaha@2070 23
hseigel@6133 24
hseigel@6133 25 # @ignore 8028733
asaha@2070 26 # @test @(#)Test6626217.sh
asaha@2070 27 # @bug 6626217
asaha@2070 28 # @summary Loader-constraint table allows arrays instead of only the base-classes
asaha@2070 29 # @run shell Test6626217.sh
asaha@2070 30 #
collins@4831 31 ## some tests require path to find test source dir
asaha@2070 32 if [ "${TESTSRC}" = "" ]
collins@4831 33 then
collins@4831 34 TESTSRC=${PWD}
collins@4831 35 echo "TESTSRC not set. Using "${TESTSRC}" as default"
asaha@2070 36 fi
collins@4831 37 echo "TESTSRC=${TESTSRC}"
collins@4831 38 ## Adding common setup Variables for running shell tests.
collins@4831 39 . ${TESTSRC}/../../test_env.sh
asaha@2070 40
asaha@2070 41 JAVA=${TESTJAVA}${FS}bin${FS}java
collins@4831 42 JAVAC=${COMPILEJAVA}${FS}bin${FS}javac
asaha@2070 43
asaha@2070 44 # Current directory is scratch directory, copy all the test source there
asaha@2070 45 # (for the subsequent moves to work).
collins@4831 46 ${CP} ${TESTSRC}${FS}* ${THIS_DIR}
asaha@2070 47
asaha@2070 48 # A Clean Compile: this line will probably fail within jtreg as have a clean dir:
asaha@2070 49 ${RM} -f *.class *.impl many_loader.java
asaha@2070 50
asaha@2070 51 # Compile all the usual suspects, including the default 'many_loader'
asaha@2070 52 ${CP} many_loader1.java.foo many_loader.java
collins@4831 53 ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint *.java
asaha@2070 54
asaha@2070 55 # Rename the class files, so the custom loader (and not the system loader) will find it
asaha@2070 56 ${MV} from_loader2.class from_loader2.impl2
asaha@2070 57
asaha@2070 58 # Compile the next version of 'many_loader'
asaha@2070 59 ${MV} many_loader.class many_loader.impl1
asaha@2070 60 ${CP} many_loader2.java.foo many_loader.java
collins@4831 61 ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint many_loader.java
asaha@2070 62
asaha@2070 63 # Rename the class file, so the custom loader (and not the system loader) will find it
asaha@2070 64 ${MV} many_loader.class many_loader.impl2
asaha@2070 65 ${MV} many_loader.impl1 many_loader.class
asaha@2070 66 ${RM} many_loader.java
asaha@2070 67
kevinw@3777 68 ${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1
acorn@2152 69 grep "loader constraint" test.out
asaha@2070 70 exit $?
asaha@2070 71

mercurial