132N/A#
2362N/A# Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
132N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
132N/A#
132N/A# This code is free software; you can redistribute it and/or modify it
132N/A# under the terms of the GNU General Public License version 2 only, as
132N/A# published by the Free Software Foundation.
132N/A#
132N/A# This code is distributed in the hope that it will be useful, but WITHOUT
132N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
132N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
132N/A# version 2 for more details (a copy is included in the LICENSE file that
132N/A# accompanied this code).
132N/A#
132N/A# You should have received a copy of the GNU General Public License version
132N/A# 2 along with this work; if not, write to the Free Software Foundation,
132N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
132N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
132N/A#
132N/A
132N/A# @test
132N/A# @bug 5088398
1153N/A# @ignore until bug 6835233 dealt with
132N/A# @summary Test parallel class loading by parallel transformers.
132N/A# @author Daniel D. Daugherty as modified from the code of Daryl Puryear @ Wily
132N/A#
132N/A# @run shell MakeJAR3.sh ParallelTransformerLoaderAgent
132N/A# @run build ParallelTransformerLoaderApp
132N/A# @run shell/timeout=240 ParallelTransformerLoader.sh
132N/A#
132N/A
132N/Aif [ "${TESTJAVA}" = "" ]
132N/Athen
132N/A echo "TESTJAVA not set. Test cannot execute. Failed."
132N/A exit 1
132N/Afi
132N/A
132N/Aif [ "${TESTSRC}" = "" ]
132N/Athen
132N/A echo "TESTSRC not set. Test cannot execute. Failed."
132N/A exit 1
132N/Afi
132N/A
132N/Aif [ "${TESTCLASSES}" = "" ]
132N/Athen
132N/A echo "TESTCLASSES not set. Test cannot execute. Failed."
132N/A exit 1
132N/Afi
132N/A
132N/AJAR="${TESTJAVA}"/bin/jar
132N/AJAVAC="${TESTJAVA}"/bin/javac
132N/AJAVA="${TESTJAVA}"/bin/java
132N/A
132N/A"${JAVAC}" -d . \
132N/A "${TESTSRC}"/TestClass1.java \
132N/A "${TESTSRC}"/TestClass2.java \
132N/A "${TESTSRC}"/TestClass3.java
132N/A
132N/A"${JAR}" cvf Test.jar Test*.class
132N/A# Removing the test class files is important. If these
132N/A# .class files are available on the classpath other
132N/A# than via Test.jar, then the deadlock will not reproduce.
132N/Arm -f Test*.class
132N/A
132N/A"${JAVA}" ${TESTVMOPTS} -javaagent:ParallelTransformerLoaderAgent.jar=Test.jar \
132N/A -classpath "${TESTCLASSES}" ParallelTransformerLoaderApp
132N/Aresult=$?
132N/Aecho "result=$result"
132N/A
132N/Aexit $result