annotate test/runtime/6878713/Test6878713.sh @ 8802:eca90b8a06eb

7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test 7123945: runtime/6878713/Test6878713.sh require about 2G of native memory, swaps and times out Summary: Add new diagnostic option -XX:MallocMaxTestWords=NNN and fix Test6878713.sh. Reviewed-by: dcubed, coleenp, dholmes, iklam
author rdurbin
date Tue, 19 Mar 2013 11:33:11 -0700
parents 83b6305a5638
children d1897e7e0488
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
1 #!/bin/sh
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
2
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
3 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
4 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
6 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
7 # This code is free software; you can redistribute it and/or modify it
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
8 # under the terms of the GNU General Public License version 2 only, as
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
9 # published by the Free Software Foundation.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
10 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
11 # This code is distributed in the hope that it will be useful, but WITHOUT
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
14 # version 2 for more details (a copy is included in the LICENSE file that
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
15 # accompanied this code).
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
16 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
17 # You should have received a copy of the GNU General Public License version
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
18 # 2 along with this work; if not, write to the Free Software Foundation,
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
20 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
22 # or visit www.oracle.com if you need additional information or have any
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
23 # questions.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
24 #
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
25
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
26
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
27
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
28 ##
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
29 ## @test
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
30 ## @bug 6878713
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
31 ## @bug 7030610
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
32 ## @bug 7037122
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
33 ## @bug 7123945
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
34 ## @summary Verifier heap corruption, relating to backward jsrs
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
35 ## @run shell Test6878713.sh
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
36 ##
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
37
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
38 if [ "${TESTSRC}" = "" ]
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
39 then TESTSRC=.
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
40 fi
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
41
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
42 if [ "${TESTJAVA}" = "" ]
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
43 then
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
44 PARENT=`dirname \`which java\``
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
45 TESTJAVA=`dirname ${PARENT}`
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
46 echo "TESTJAVA not set, selecting " ${TESTJAVA}
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
47 echo "If this is incorrect, try setting the variable manually."
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
48 fi
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
49
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
50 if [ "${TESTCLASSES}" = "" ]
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
51 then
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
52 echo "TESTCLASSES not set. Test cannot execute. Failed."
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
53 exit 1
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
54 fi
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
55
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
56 # set platform-dependent variables
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
57 OS=`uname -s`
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
58 case "$OS" in
6598
6acee021f5ac 7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents: 6074
diff changeset
59 SunOS | Linux | Darwin )
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
60 NULL=/dev/null
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
61 PS=":"
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
62 FS="/"
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
63 ;;
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
64 Windows_* )
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
65 NULL=NUL
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
66 PS=";"
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
67 FS="\\"
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
68 ;;
6635
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
69 CYGWIN_* )
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
70 NULL=/dev/null
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
71 PS=";"
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
72 FS="/"
83b6305a5638 7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents: 6598
diff changeset
73 ;;
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
74 * )
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
75 echo "Unrecognized system!"
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
76 exit 1;
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
77 ;;
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
78 esac
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
79
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
80 CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
81
6074
037973617842 7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents: 2307
diff changeset
82 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
83
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
84 TARGET_CLASS=OOMCrashClass1960_2
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
85
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
86 echo "INFO: extracting the target class."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
87 ${TESTJAVA}${FS}bin${FS}jar xvf \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
88 ${TESTSRC}${FS}testcase.jar ${TARGET_CLASS}.class
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
89
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
90 # remove any hs_err_pid that might exist here
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
91 rm -f hs_err_pid*.log
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
92
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
93 echo "INFO: checking for 32-bit versus 64-bit VM."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
94 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version 2>&1 \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
95 | grep "64-Bit [^ ][^ ]* VM" > /dev/null 2>&1
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
96 status="$?"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
97 if [ "$status" = 0 ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
98 echo "INFO: testing a 64-bit VM."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
99 is_64_bit=true
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
100 else
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
101 echo "INFO: testing a 32-bit VM."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
102 fi
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
103
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
104 if [ "$is_64_bit" = true ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
105 # limit is 768MB in 8-byte words (1024 * 1024 * 768 / 8) == 100663296
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
106 MALLOC_MAX=100663296
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
107 else
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
108 # limit is 768MB in 4-byte words (1024 * 1024 * 768 / 4) == 201326592
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
109 MALLOC_MAX=201326592
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
110 fi
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
111 echo "INFO: MALLOC_MAX=$MALLOC_MAX"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
112
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
113 echo "INFO: executing the target class."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
114 # -XX:+PrintCommandLineFlags for debugging purposes
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
115 # -XX:+IgnoreUnrecognizedVMOptions so test will run on a VM without
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
116 # the new -XX:MallocMaxTestWords option
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
117 # -XX:+UnlockDiagnosticVMOptions so we can use -XX:MallocMaxTestWords
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
118 # -XX:MallocMaxTestWords limits malloc to $MALLOC_MAX
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
119 ${TESTJAVA}${FS}bin${FS}java \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
120 -XX:+PrintCommandLineFlags \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
121 -XX:+IgnoreUnrecognizedVMOptions \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
122 -XX:+UnlockDiagnosticVMOptions \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
123 -XX:MallocMaxTestWords=$MALLOC_MAX \
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
124 ${TESTVMOPTS} ${TARGET_CLASS} > test.out 2>&1
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
125
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
126 echo "INFO: begin contents of test.out:"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
127 cat test.out
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
128 echo "INFO: end contents of test.out."
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
129
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
130 echo "INFO: checking for memory allocation error message."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
131 # We are looking for this specific memory allocation failure mesg so
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
132 # we know we exercised the right allocation path with the test class:
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
133 MESG1="Native memory allocation (malloc) failed to allocate 25696531[0-9][0-9] bytes"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
134 grep "$MESG1" test.out
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
135 status="$?"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
136 if [ "$status" = 0 ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
137 echo "INFO: found expected memory allocation error message."
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
138 else
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
139 echo "INFO: did not find expected memory allocation error message."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
140
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
141 # If we didn't find MESG1 above, then there are several scenarios:
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
142 # 1) -XX:MallocMaxTestWords is not supported by the current VM and we
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
143 # didn't fail TARGET_CLASS's memory allocation attempt; instead
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
144 # we failed to find TARGET_CLASS's main() method. The TARGET_CLASS
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
145 # is designed to provoke a memory allocation failure during class
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
146 # loading; we actually don't care about running the class which is
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
147 # why it doesn't have a main() method.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
148 # 2) we failed a memory allocation, but not the one we were looking
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
149 # so it might be that TARGET_CLASS no longer tickles the same
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
150 # memory allocation code path
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
151 # 3) TARGET_CLASS reproduces the failure mode (SIGSEGV) fixed by
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
152 # 6878713 because the test is running on a pre-fix VM.
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
153 echo "INFO: checking for no main() method message."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
154 MESG2="Error: Main method not found in class"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
155 grep "$MESG2" test.out
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
156 status="$?"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
157 if [ "$status" = 0 ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
158 echo "INFO: found no main() method message."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
159 else
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
160 echo "FAIL: did not find no main() method message."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
161 # status is non-zero for exit below
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
162
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
163 if [ -s hs_err_pid*.log ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
164 echo "INFO: begin contents of hs_err_pid file:"
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
165 cat hs_err_pid*.log
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
166 echo "INFO: end contents of hs_err_pid file."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
167 fi
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
168 fi
2307
4a9604cd7c5f 6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff changeset
169 fi
8802
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
170
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
171 if [ "$status" = 0 ]; then
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
172 echo "PASS: test found one of the expected messages."
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
173 fi
eca90b8a06eb 7030610: runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
rdurbin
parents: 6635
diff changeset
174 exit "$status"