Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/test/runtime/6626217/Test6626217.sh
32284 views
#1# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#222324# @test @(#)Test6626217.sh25# @bug 662621726# @summary Loader-constraint table allows arrays instead of only the base-classes27# @run shell Test6626217.sh28#29## some tests require path to find test source dir30if [ "${TESTSRC}" = "" ]31then32TESTSRC=${PWD}33echo "TESTSRC not set. Using "${TESTSRC}" as default"34fi35echo "TESTSRC=${TESTSRC}"36## Adding common setup Variables for running shell tests.37. ${TESTSRC}/../../test_env.sh3839JAVA=${TESTJAVA}${FS}bin${FS}java40JAVAC=${COMPILEJAVA}${FS}bin${FS}javac4142# Current directory is scratch directory, copy all the test source there43# (for the subsequent moves to work).44${CP} ${TESTSRC}${FS}* ${THIS_DIR}4546# A Clean Compile: this line will probably fail within jtreg as have a clean dir:47${RM} -f *.class *.impl many_loader.java4849# Compile all the usual suspects, including the default 'many_loader'50${CP} many_loader1.java.foo many_loader.java51${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint *.java5253# Rename the class files, so the custom loader (and not the system loader) will find it54${MV} from_loader2.class from_loader2.impl25556# Compile the next version of 'many_loader'57${MV} many_loader.class many_loader.impl158${CP} many_loader2.java.foo many_loader.java59${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint many_loader.java6061# Rename the class file, so the custom loader (and not the system loader) will find it62${MV} many_loader.class many_loader.impl263${MV} many_loader.impl1 many_loader.class64${RM} many_loader.java6566${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&167grep "loader constraint" test.out68exit $?69707172