author | alexsch |
Thu, 31 Jul 2014 14:28:10 +0400 | |
changeset 26019 | 10a56d28f48d |
parent 23046 | 0b0407b1e2a5 |
child 31907 | cafb1bf49cfb |
permissions | -rw-r--r-- |
2 | 1 |
#!/bin/sh |
2 |
||
3 |
# |
|
23046
0b0407b1e2a5
6946101: ShellScaffold.sh based tests can issue "write error: Broken pipe" messages
iignatyev
parents:
5506
diff
changeset
|
4 |
# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. |
2 | 5 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 |
# |
|
7 |
# This code is free software; you can redistribute it and/or modify it |
|
8 |
# under the terms of the GNU General Public License version 2 only, as |
|
9 |
# published by the Free Software Foundation. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# @test |
|
27 |
# @bug 4525714 |
|
28 |
# @summary jtreg test PopAsynchronousTest fails in build 85 with -Xcomp |
|
29 |
# @author Jim Holmlund/Swamy Venkataramanappa |
|
30 |
# @run shell DeoptimizeWalk.sh |
|
31 |
||
32 |
# This is another test of the same bug. The bug occurs when trying |
|
33 |
# to walk the stack of a deoptimized thread. We can do this |
|
34 |
# by running in -Xcomp mode and by doing a step which causes deopt, |
|
35 |
# and then a 'where'. This will cause not all the frames to be shown. |
|
36 |
||
37 |
compileOptions=-g |
|
38 |
||
39 |
echo "*********** This test only fails with -Xcomp ***************" |
|
40 |
createJavaFile() |
|
41 |
{ |
|
42 |
cat <<EOF > $1.java.1 |
|
43 |
||
44 |
public class $1 { |
|
45 |
static public void main(String[] args) { |
|
46 |
$1 mine = new $1(); |
|
47 |
mine.a1(89); |
|
48 |
} |
|
49 |
||
50 |
public void a1(int p1) { |
|
51 |
int v1 = 89; |
|
52 |
System.out.println("a1" + v1); |
|
53 |
a2(89); |
|
54 |
} |
|
55 |
||
56 |
||
57 |
public void a2(int pp) { |
|
58 |
int v2 = 89; |
|
59 |
System.out.println("a2" + v2); |
|
60 |
a3(89); |
|
61 |
} |
|
62 |
||
63 |
public void a3(int pp) { |
|
64 |
int v3 = 89; |
|
65 |
System.out.println("a3"); //@ 1 breakpoint |
|
66 |
a4(22); // it passes if this line is commented out |
|
67 |
System.out.println("jj"); |
|
68 |
} |
|
23046
0b0407b1e2a5
6946101: ShellScaffold.sh based tests can issue "write error: Broken pipe" messages
iignatyev
parents:
5506
diff
changeset
|
69 |
|
2 | 70 |
public void a4(int pp) { |
71 |
int v4 = 90; |
|
72 |
System.out.println("a4: @1 breakpoint here"); |
|
73 |
} |
|
74 |
} |
|
75 |
EOF |
|
76 |
} |
|
77 |
||
78 |
# This is called to feed cmds to jdb. |
|
79 |
dojdbCmds() |
|
80 |
{ |
|
81 |
setBkpts @1 |
|
82 |
runToBkpt @1 |
|
83 |
cmd where |
|
84 |
#cmd next |
|
85 |
cmd step |
|
86 |
cmd where |
|
87 |
} |
|
88 |
||
89 |
||
90 |
mysetup() |
|
91 |
{ |
|
92 |
if [ -z "$TESTSRC" ] ; then |
|
93 |
TESTSRC=. |
|
94 |
fi |
|
95 |
||
96 |
for ii in . $TESTSRC $TESTSRC/.. ; do |
|
97 |
if [ -r "$ii/ShellScaffold.sh" ] ; then |
|
98 |
. $ii/ShellScaffold.sh |
|
99 |
break |
|
100 |
fi |
|
101 |
done |
|
102 |
} |
|
103 |
||
104 |
# You could replace this next line with the contents |
|
105 |
# of ShellScaffold.sh and this script will run just the same. |
|
106 |
mysetup |
|
107 |
||
108 |
runit |
|
23046
0b0407b1e2a5
6946101: ShellScaffold.sh based tests can issue "write error: Broken pipe" messages
iignatyev
parents:
5506
diff
changeset
|
109 |
jdbFailIfNotPresent "shtest\.main" 3 |
2 | 110 |
debuggeeFailIfPresent "Internal exception:" |
111 |
pass |