author | lana |
Thu, 26 Dec 2013 12:04:16 -0800 | |
changeset 23010 | 6dadb192ad81 |
parent 15254 | 3997a6f357cb |
child 23035 | e8fb6d863cef |
permissions | -rw-r--r-- |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
1 |
# |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
15254
diff
changeset
|
2 |
# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
4 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
8 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
13 |
# accompanied this code). |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
14 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
15 |
# You should have received a copy of the GNU General Public License version |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
18 |
# |
5506 | 19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
# or visit www.oracle.com if you need additional information or have any |
|
21 |
# questions. |
|
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
22 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
23 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
24 |
# @test |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
25 |
# @bug 5088398 |
2638
d4447065286a
6835241: Annotate some tests with @ignore that have shown to be unpredictable
ohair
parents:
272
diff
changeset
|
26 |
# @ignore until bug 6835233 dealt with |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
27 |
# @summary Test parallel class loading by parallel transformers. |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
28 |
# @author Daniel D. Daugherty as modified from the code of Daryl Puryear @ Wily |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
29 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
30 |
# @run shell MakeJAR3.sh ParallelTransformerLoaderAgent |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
31 |
# @run build ParallelTransformerLoaderApp |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
32 |
# @run shell/timeout=240 ParallelTransformerLoader.sh |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
33 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
34 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
35 |
if [ "${TESTJAVA}" = "" ] |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
36 |
then |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
37 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
38 |
exit 1 |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
39 |
fi |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
40 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
41 |
if [ "${COMPILEJAVA}" = "" ] |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
42 |
then |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
43 |
COMPILEJAVA="${TESTJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
44 |
fi |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
45 |
echo "COMPILEJAVA=${COMPILEJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
46 |
|
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
47 |
if [ "${TESTSRC}" = "" ] |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
48 |
then |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
49 |
echo "TESTSRC not set. Test cannot execute. Failed." |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
50 |
exit 1 |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
51 |
fi |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
52 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
53 |
if [ "${TESTCLASSES}" = "" ] |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
54 |
then |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
55 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
56 |
exit 1 |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
57 |
fi |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
58 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
59 |
JAR="${COMPILEJAVA}"/bin/jar |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
60 |
JAVAC="${COMPILEJAVA}"/bin/javac |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
61 |
JAVA="${TESTJAVA}"/bin/java |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
62 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
63 |
"${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d .\ |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
64 |
"${TESTSRC}"/TestClass1.java \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
65 |
"${TESTSRC}"/TestClass2.java \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
66 |
"${TESTSRC}"/TestClass3.java |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
67 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
68 |
"${JAR}" ${TESTTOOLVMOPTS} cvf Test.jar Test*.class |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
69 |
# Removing the test class files is important. If these |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
70 |
# .class files are available on the classpath other |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
71 |
# than via Test.jar, then the deadlock will not reproduce. |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
72 |
rm -f Test*.class |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
73 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
74 |
"${JAVA}" ${TESTVMOPTS} -javaagent:ParallelTransformerLoaderAgent.jar=Test.jar \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
75 |
-classpath "${TESTCLASSES}" ParallelTransformerLoaderApp |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
76 |
result=$? |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
77 |
echo "result=$result" |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
78 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
79 |
exit $result |