Thu, 20 Sep 2012 13:44:28 -0700
Added tag jdk8-b57 for changeset d70102c4cb73
1 #!/bin/sh
3 ##
4 ## @test
5 ## @bug 7020373 7055247 7053586 7185550
6 ## @key cte_test
7 ## @summary JSR rewriting can overflow memory address size variables
8 ## @ignore Ignore it as 7053586 test uses lots of memory. See bug report for detail.
9 ## @run shell Test7020373.sh
10 ##
12 if [ "${TESTSRC}" = "" ]
13 then TESTSRC=.
14 fi
16 if [ "${TESTJAVA}" = "" ]
17 then
18 PARENT=`dirname \`which java\``
19 TESTJAVA=`dirname ${PARENT}`
20 echo "TESTJAVA not set, selecting " ${TESTJAVA}
21 echo "If this is incorrect, try setting the variable manually."
22 fi
24 if [ "${TESTCLASSES}" = "" ]
25 then
26 echo "TESTCLASSES not set. Test cannot execute. Failed."
27 exit 1
28 fi
30 # set platform-dependent variables
31 OS=`uname -s`
32 case "$OS" in
33 SunOS | Linux | Darwin )
34 NULL=/dev/null
35 PS=":"
36 FS="/"
37 ;;
38 Windows_* )
39 NULL=NUL
40 PS=";"
41 FS="\\"
42 ;;
43 CYGWIN_* )
44 NULL=/dev/null
45 PS=";"
46 FS="/"
47 ;;
48 * )
49 echo "Unrecognized system!"
50 exit 1;
51 ;;
52 esac
54 JEMMYPATH=${CPAPPEND}
55 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
57 THIS_DIR=`pwd`
59 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
61 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
63 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1
65 cat test.out
67 egrep "SIGSEGV|An unexpected error has been detected" test.out
69 if [ $? = 0 ]
70 then
71 echo "Test Failed"
72 exit 1
73 else
74 egrep "java.lang.LinkageError|java.lang.NoSuchMethodError|Main method not found in class OOMCrashClass4000_1|insufficient memory" test.out
75 if [ $? = 0 ]
76 then
77 echo "Test Passed"
78 exit 0
79 else
80 echo "Test Failed"
81 exit 1
82 fi
83 fi