10 ## 11 12 if [ "${TESTSRC}" = "" ] 13 then TESTSRC=. 14 fi 15 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 23 24 if [ "${TESTCLASSES}" = "" ] 25 then 26 echo "TESTCLASSES not set. Test cannot execute. Failed." 27 exit 1 28 fi 29 30 BIT_FLAG="" 31 32 # set platform-dependent variables 33 OS=`uname -s` 34 case "$OS" in 35 SunOS | Linux ) 36 NULL=/dev/null 37 PS=":" 38 FS="/" 39 ## for solaris, linux it's HOME 40 FILE_LOCATION=$HOME 41 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] 42 then 43 BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` 44 fi 45 ;; 46 Windows_* ) 47 NULL=NUL 48 PS=";" 49 FS="\\" 50 ;; 51 * ) 52 echo "Unrecognized system!" 53 exit 1; 54 ;; 55 esac 56 57 JEMMYPATH=${CPAPPEND} 58 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH 59 60 THIS_DIR=`pwd` 61 62 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version 63 64 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar 65 66 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1 67 68 cat test.out 69 70 egrep "SIGSEGV|An unexpected error has been detected" test.out 71 72 if [ $? = 0 ] 73 then 74 echo "Test Failed" 75 exit 1 76 else 77 grep "java.lang.LinkageError" test.out 78 if [ $? = 0 ] 79 then 80 echo "Test Passed" 81 exit 0 82 else 83 echo "Test Failed" 84 exit 1 85 fi 86 fi | 10 ## 11 12 if [ "${TESTSRC}" = "" ] 13 then TESTSRC=. 14 fi 15 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 23 24 if [ "${TESTCLASSES}" = "" ] 25 then 26 echo "TESTCLASSES not set. Test cannot execute. Failed." 27 exit 1 28 fi 29 30 # set platform-dependent variables 31 OS=`uname -s` 32 case "$OS" in 33 SunOS | Linux ) 34 NULL=/dev/null 35 PS=":" 36 FS="/" 37 ;; 38 Windows_* ) 39 NULL=NUL 40 PS=";" 41 FS="\\" 42 ;; 43 * ) 44 echo "Unrecognized system!" 45 exit 1; 46 ;; 47 esac 48 49 JEMMYPATH=${CPAPPEND} 50 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH 51 52 THIS_DIR=`pwd` 53 54 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version 55 56 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar 57 58 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1 59 60 cat test.out 61 62 egrep "SIGSEGV|An unexpected error has been detected" test.out 63 64 if [ $? = 0 ] 65 then 66 echo "Test Failed" 67 exit 1 68 else 69 grep "java.lang.LinkageError" test.out 70 if [ $? = 0 ] 71 then 72 echo "Test Passed" 73 exit 0 74 else 75 echo "Test Failed" 76 exit 1 77 fi 78 fi |