author | ohair |
Tue, 28 Apr 2009 14:43:44 -0700 | |
changeset 2638 | d4447065286a |
parent 272 | c4e0a3afe6f2 |
child 5506 | 202f599c92aa |
permissions | -rw-r--r-- |
272
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
1 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
2 |
# Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
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 |
# |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
19 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
20 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
21 |
# have any questions. |
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 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
41 |
if [ "${TESTSRC}" = "" ] |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
42 |
then |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
43 |
echo "TESTSRC not set. Test cannot execute. Failed." |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
44 |
exit 1 |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
45 |
fi |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
46 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
47 |
if [ "${TESTCLASSES}" = "" ] |
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 "TESTCLASSES 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 |
JAR="${TESTJAVA}"/bin/jar |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
54 |
JAVAC="${TESTJAVA}"/bin/javac |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
55 |
JAVA="${TESTJAVA}"/bin/java |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
56 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
57 |
"${JAVAC}" -d . \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
58 |
"${TESTSRC}"/TestClass1.java \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
59 |
"${TESTSRC}"/TestClass2.java \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
60 |
"${TESTSRC}"/TestClass3.java |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
61 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
62 |
"${JAR}" cvf Test.jar Test*.class |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
63 |
# Removing the test class files is important. If these |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
64 |
# .class files are available on the classpath other |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
65 |
# 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
|
66 |
rm -f Test*.class |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
67 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
68 |
"${JAVA}" ${TESTVMOPTS} -javaagent:ParallelTransformerLoaderAgent.jar=Test.jar \ |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
69 |
-classpath "${TESTCLASSES}" ParallelTransformerLoaderApp |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
70 |
result=$? |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
71 |
echo "result=$result" |
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
72 |
|
c4e0a3afe6f2
5088398: 3/2 java.lang.instrument TCK test deadlock (test11)
dcubed
parents:
diff
changeset
|
73 |
exit $result |