Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/lang/instrument/ParallelTransformerLoader.sh
38813 views
#1# Copyright (c) 2008, 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#2223# @test24# @bug 508839825# @ignore until bug 6835233 dealt with26# @summary Test parallel class loading by parallel transformers.27# @author Daniel D. Daugherty as modified from the code of Daryl Puryear @ Wily28#29# @run shell MakeJAR3.sh ParallelTransformerLoaderAgent30# @run build ParallelTransformerLoaderApp31# @run shell/timeout=240 ParallelTransformerLoader.sh32#3334if [ "${TESTJAVA}" = "" ]35then36echo "TESTJAVA not set. Test cannot execute. Failed."37exit 138fi3940if [ "${COMPILEJAVA}" = "" ]41then42COMPILEJAVA="${TESTJAVA}"43fi44echo "COMPILEJAVA=${COMPILEJAVA}"4546if [ "${TESTSRC}" = "" ]47then48echo "TESTSRC not set. Test cannot execute. Failed."49exit 150fi5152if [ "${TESTCLASSES}" = "" ]53then54echo "TESTCLASSES not set. Test cannot execute. Failed."55exit 156fi5758JAR="${COMPILEJAVA}"/bin/jar59JAVAC="${COMPILEJAVA}"/bin/javac60JAVA="${TESTJAVA}"/bin/java6162"${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d .\63"${TESTSRC}"/TestClass1.java \64"${TESTSRC}"/TestClass2.java \65"${TESTSRC}"/TestClass3.java6667"${JAR}" ${TESTTOOLVMOPTS} cvf Test.jar Test*.class68# Removing the test class files is important. If these69# .class files are available on the classpath other70# than via Test.jar, then the deadlock will not reproduce.71rm -f Test*.class7273"${JAVA}" ${TESTVMOPTS} -javaagent:ParallelTransformerLoaderAgent.jar=Test.jar \74-classpath "${TESTCLASSES}" ParallelTransformerLoaderApp75result=$?76echo "result=$result"7778exit $result798081