author | alanb |
Fri, 07 Apr 2017 08:05:54 +0000 | |
changeset 44545 | 83b611b88ac8 |
parent 33402 | 1156d495a525 |
permissions | -rw-r--r-- |
25515
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
1 |
# |
30376
2ccf2cf7ea48
8078896: Add @modules as needed to the jdk_svc tests
ykantser
parents:
25515
diff
changeset
|
2 |
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
25515
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
4 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
8 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
13 |
# accompanied this code). |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
14 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
15 |
# You should have received a copy of the GNU General Public License version |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
18 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
20 |
# or visit www.oracle.com if you need additional information or have any |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
21 |
# questions. |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
22 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
23 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
24 |
# @test |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
25 |
# @bug 8042796 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
26 |
# @summary jvmtiRedefineClasses.cpp: guarantee(false) failed: OLD and/or OBSOLETE method(s) found |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
27 |
# @author Daniel D. Daugherty |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
28 |
# @author Serguei Spitsyn |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
29 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
30 |
# @run shell MakeJAR3.sh RedefineMethodDelInvokeAgent 'Can-Redefine-Classes: true' |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
31 |
# @run build RedefineMethodDelInvokeApp |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
32 |
# @run shell RedefineMethodDelInvoke.sh |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
33 |
# |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
34 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
35 |
if [ "${TESTJAVA}" = "" ] |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
36 |
then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
37 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
38 |
exit 1 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
39 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
40 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
41 |
if [ "${COMPILEJAVA}" = "" ] |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
42 |
then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
43 |
COMPILEJAVA="${TESTJAVA}" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
44 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
45 |
echo "COMPILEJAVA=${COMPILEJAVA}" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
46 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
47 |
if [ "${TESTSRC}" = "" ] |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
48 |
then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
49 |
echo "TESTSRC not set. Test cannot execute. Failed." |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
50 |
exit 1 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
51 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
52 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
53 |
if [ "${TESTCLASSES}" = "" ] |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
54 |
then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
55 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
56 |
exit 1 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
57 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
58 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
59 |
JAVAC="${COMPILEJAVA}"/bin/javac |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
60 |
JAVA="${TESTJAVA}"/bin/java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
61 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
62 |
cp "${TESTSRC}"/RedefineMethodDelInvokeTarget_1.java \ |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
63 |
RedefineMethodDelInvokeTarget.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
64 |
"${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . RedefineMethodDelInvokeTarget.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
65 |
mv RedefineMethodDelInvokeTarget.java RedefineMethodDelInvokeTarget_1.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
66 |
mv RedefineMethodDelInvokeTarget.class RedefineMethodDelInvokeTarget_1.class |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
67 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
68 |
cp "${TESTSRC}"/RedefineMethodDelInvokeTarget_2.java \ |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
69 |
RedefineMethodDelInvokeTarget.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
70 |
"${JAVAC}" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . RedefineMethodDelInvokeTarget.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
71 |
mv RedefineMethodDelInvokeTarget.java RedefineMethodDelInvokeTarget_2.java |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
72 |
mv RedefineMethodDelInvokeTarget.class RedefineMethodDelInvokeTarget_2.class |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
73 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
74 |
"${JAVA}" ${TESTVMOPTS} -javaagent:RedefineMethodDelInvokeAgent.jar \ |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
75 |
-classpath "${TESTCLASSES}" RedefineMethodDelInvokeApp > output.log 2>&1 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
76 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
77 |
result=$? |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
78 |
if [ "$result" = 0 ]; then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
79 |
echo "The test returned expected exit code: $result" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
80 |
else |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
81 |
echo "FAIL: the test returned unexpected exit code: $result" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
82 |
exit $result |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
83 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
84 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
85 |
cat output.log |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
86 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
87 |
MESG="Exception" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
88 |
grep "$MESG" output.log |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
89 |
result=$? |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
90 |
if [ "$result" = 0 ]; then |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
91 |
echo "FAIL: found '$MESG' in the test output" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
92 |
result=1 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
93 |
else |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
94 |
echo "PASS: did NOT find '$MESG' in the test output" |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
95 |
result=0 |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
96 |
fi |
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
97 |
|
53904b7884f7
8048185: [TESTBUG] need a JTREG test for the fix of JDK-8042796 (OLD and/or OBSOLETE method(s) found)
sspitsyn
parents:
diff
changeset
|
98 |
exit $result |