Mercurial > hg > truffle
annotate test/runtime/7158988/TestFieldMonitor.sh @ 6455:c4d21bd7653b
made position calculation for VMErrorNode more robust when debug info is not available
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 27 Sep 2012 16:58:01 +0200 |
parents | 037973617842 |
children | 6acee021f5ac |
rev | line source |
---|---|
5995
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
1 #!/bin/sh |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
2 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
3 if [ "${TESTSRC}" = "" ] |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
4 then TESTSRC=. |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
5 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
6 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
7 if [ "${TESTJAVA}" = "" ] |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
8 then |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
9 PARENT=`dirname \`which java\`` |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
10 TESTJAVA=`dirname ${PARENT}` |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
11 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
12 echo "If this is incorrect, try setting the variable manually." |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
13 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
14 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
15 if [ "${TESTCLASSES}" = "" ] |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
16 then |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
17 echo "TESTCLASSES not set. Test cannot execute. Failed." |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
18 exit 1 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
19 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
20 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
21 # set platform-dependent variables |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
22 OS=`uname -s` |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
23 case "$OS" in |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
24 SunOS | Linux ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
25 NULL=/dev/null |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
26 PS=":" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
27 FS="/" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
28 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
29 Windows_95 | Windows_98 | Windows_ME ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
30 NULL=NUL |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
31 PS=";" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
32 FS="\\" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
33 echo "Test skipped, only for WinNT" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
34 exit 0 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
35 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
36 Windows_NT ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
37 NULL=NUL |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
38 PS=";" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
39 FS="\\" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
40 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
41 * ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
42 echo "Unrecognized system!" |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
43 exit 1; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
44 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
45 esac |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
46 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
47 #CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
48 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
49 cp ${TESTSRC}${FS}*.java . |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
50 |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
5995
diff
changeset
|
51 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion |
5995
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
52 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
53 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
54 |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
5995
diff
changeset
|
55 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out 2>&1 & |
5995
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
56 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
57 P_PID=$! |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
58 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
59 sleep 60 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
60 STATUS=0 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
61 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
62 case "$OS" in |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
63 SunOS | Linux ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
64 ps -ef | grep $P_PID | grep -v grep > ${NULL} |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
65 if [ $? = 0 ]; then |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
66 kill -9 $P_PID |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
67 STATUS=1 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
68 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
69 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
70 * ) |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
71 ps | grep -i "FieldMonitor" | grep -v grep > ${NULL} |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
72 if [ $? = 0 ]; then |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
73 C_PID=`ps | grep -i "FieldMonitor" | awk '{print $1}'` |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
74 kill -s 9 $C_PID |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
75 STATUS=1 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
76 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
77 ;; |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
78 esac |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
79 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
80 grep "A fatal error has been detected" test.out > ${NULL} |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
81 if [ $? = 0 ]; then |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
82 cat test.out |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
83 STATUS=1 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
84 fi |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
85 |
19e197e2a1af
7158988: jvm crashes while debugging on x86_32 and x86_64
coleenp
parents:
diff
changeset
|
86 exit $STATUS |