author | michaelm |
Wed, 21 Dec 2011 10:06:32 +0000 | |
changeset 11355 | c2cb710f1bdd |
parent 8481 | 42a79b703814 |
child 12729 | 684b5857e506 |
permissions | -rw-r--r-- |
8481
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
1 |
#!/bin/sh |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
2 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
3 |
## |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
4 |
## @test |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
5 |
## @bug 6878713 |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
6 |
## @summary Verifier heap corruption, relating to backward jsrs |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
7 |
## @run shell/timeout=120 Test6878713.sh |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
8 |
## |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
9 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
10 |
if [ "${TESTSRC}" = "" ] |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
11 |
then TESTSRC=. |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
12 |
fi |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
13 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
14 |
if [ "${TESTJAVA}" = "" ] |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
15 |
then |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
16 |
PARENT=`dirname \`which java\`` |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
17 |
TESTJAVA=`dirname ${PARENT}` |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
18 |
echo "TESTJAVA not set, selecting " ${TESTJAVA} |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
19 |
echo "If this is incorrect, try setting the variable manually." |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
20 |
fi |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
21 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
22 |
if [ "${TESTCLASSES}" = "" ] |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
23 |
then |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
24 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
25 |
exit 1 |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
26 |
fi |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
27 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
28 |
BIT_FLAG="" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
29 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
30 |
# set platform-dependent variables |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
31 |
OS=`uname -s` |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
32 |
case "$OS" in |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
33 |
SunOS | Linux ) |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
34 |
NULL=/dev/null |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
35 |
PS=":" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
36 |
FS="/" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
37 |
## for solaris, linux it's HOME |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
38 |
FILE_LOCATION=$HOME |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
39 |
if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
40 |
then |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
41 |
BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
42 |
fi |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
43 |
;; |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
44 |
Windows_* ) |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
45 |
NULL=NUL |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
46 |
PS=";" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
47 |
FS="\\" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
48 |
;; |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
49 |
* ) |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
50 |
echo "Unrecognized system!" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
51 |
exit 1; |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
52 |
;; |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
53 |
esac |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
54 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
55 |
JEMMYPATH=${CPAPPEND} |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
56 |
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
57 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
58 |
THIS_DIR=`pwd` |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
59 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
60 |
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
61 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
62 |
${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
63 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
64 |
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass1960_2 > test.out 2>&1 |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
65 |
|
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
66 |
if [ -s core -o -s "hs_*.log" ] |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
67 |
then |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
68 |
cat hs*.log |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
69 |
echo "Test Failed" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
70 |
exit 1 |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
71 |
else |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
72 |
echo "Test Passed" |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
73 |
exit 0 |
42a79b703814
6878713: Verifier heap corruption, relating to backward jsrs
kamg
parents:
diff
changeset
|
74 |
fi |