annotate test/runtime/7020373/Test7020373.sh @ 4225:339cf8d4904d

Made mx.run work properly when stderr is redirected to stdout. Made outputparser redirect stderr to stdout. Added copyright headers to outputparser.py and sanitycheck.py. Reverted class path construction in mx.build() to use includeSelf=True to fix regression when running 'mx build -c'.
author Doug Simon <doug.simon@oracle.com>
date Thu, 05 Jan 2012 11:31:46 +0100
parents a884a8b0ec6d
children 037973617842
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3424
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
1 #!/bin/sh
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
2
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
3 ##
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
4 ## @test
3439
a884a8b0ec6d 7055247: Ignore test of # 7020373
asaha
parents: 3424
diff changeset
5 ## @bug 7020373 7055247
3424
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
6 ## @key cte_test
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
7 ## @summary JSR rewriting can overflow memory address size variables
3439
a884a8b0ec6d 7055247: Ignore test of # 7020373
asaha
parents: 3424
diff changeset
8 ## @ignore Ignore it until 7053586 fixed
3424
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
9 ## @run shell Test7020373.sh
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
10 ##
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
11
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
12 if [ "${TESTSRC}" = "" ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
13 then TESTSRC=.
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
14 fi
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
15
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
16 if [ "${TESTJAVA}" = "" ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
17 then
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
18 PARENT=`dirname \`which java\``
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
19 TESTJAVA=`dirname ${PARENT}`
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
20 echo "TESTJAVA not set, selecting " ${TESTJAVA}
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
21 echo "If this is incorrect, try setting the variable manually."
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
22 fi
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
23
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
24 if [ "${TESTCLASSES}" = "" ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
25 then
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
26 echo "TESTCLASSES not set. Test cannot execute. Failed."
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
27 exit 1
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
28 fi
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
29
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
30 BIT_FLAG=""
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
31
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
32 # set platform-dependent variables
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
33 OS=`uname -s`
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
34 case "$OS" in
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
35 SunOS | Linux )
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
36 NULL=/dev/null
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
37 PS=":"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
38 FS="/"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
39 ## for solaris, linux it's HOME
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
40 FILE_LOCATION=$HOME
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
41 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
42 then
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
43 BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'`
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
44 fi
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
45 ;;
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
46 Windows_* )
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
47 NULL=NUL
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
48 PS=";"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
49 FS="\\"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
50 ;;
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
51 * )
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
52 echo "Unrecognized system!"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
53 exit 1;
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
54 ;;
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
55 esac
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
56
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
57 JEMMYPATH=${CPAPPEND}
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
58 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
59
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
60 THIS_DIR=`pwd`
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
61
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
62 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
63
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
64 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
65
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
66 ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} OOMCrashClass4000_1 > test.out 2>&1
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
67
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
68 cat test.out
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
69
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
70 egrep "SIGSEGV|An unexpected error has been detected" test.out
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
71
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
72 if [ $? = 0 ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
73 then
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
74 echo "Test Failed"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
75 exit 1
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
76 else
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
77 grep "java.lang.LinkageError" test.out
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
78 if [ $? = 0 ]
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
79 then
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
80 echo "Test Passed"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
81 exit 0
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
82 else
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
83 echo "Test Failed"
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
84 exit 1
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
85 fi
540930dc854d 7020373: JSR rewriting can overflow memory address size variables
kamg
parents:
diff changeset
86 fi