Mercurial > hg > graal-compiler
annotate test/runtime/jsig/Test8017498.sh @ 11790:70f43f67cdcb
StubForeignCallNode is not a DeoptimizingNode
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 25 Sep 2013 13:05:16 +0200 |
parents | 72727c4b6dec |
children | f9ee986a9fea |
rev | line source |
---|---|
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
1 #!/bin/sh |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
2 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
3 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
4 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
6 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
7 # This code is free software; you can redistribute it and/or modify it |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
8 # under the terms of the GNU General Public License version 2 only, as |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
9 # published by the Free Software Foundation. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
10 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
11 # This code is distributed in the hope that it will be useful, but WITHOUT |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
14 # version 2 for more details (a copy is included in the LICENSE file that |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
15 # accompanied this code). |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
16 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
17 # You should have received a copy of the GNU General Public License version |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
18 # 2 along with this work; if not, write to the Free Software Foundation, |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
20 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
22 # or visit www.oracle.com if you need additional information or have any |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
23 # questions. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
24 # |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
25 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
26 ## |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
27 ## @test Test8017498.sh |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
28 ## @bug 8017498 |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
29 ## @bug 8020791 |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
30 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
31 ## @run shell/timeout=30 Test8017498.sh |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
32 ## |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
33 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
34 if [ "${TESTSRC}" = "" ] |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
35 then |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
36 TESTSRC=${PWD} |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
37 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
38 fi |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
39 echo "TESTSRC=${TESTSRC}" |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
40 ## Adding common setup Variables for running shell tests. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
41 . ${TESTSRC}/../../test_env.sh |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
42 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
43 # set platform-dependent variables |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
44 OS=`uname -s` |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
45 case "$OS" in |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
46 Linux) |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
47 echo "Testing on Linux" |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
48 if [ "$VM_BITS" = "64" ] |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
49 then |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
50 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
51 else |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
52 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
53 fi |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
54 echo MY_LD_PRELOAD = ${MY_LD_PRELOAD} |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
55 ;; |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
56 *) |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
57 echo "Test passed; only valid for Linux" |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
58 exit 0; |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
59 ;; |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
60 esac |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
61 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
62 THIS_DIR=. |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
63 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
64 cp ${TESTSRC}${FS}*.java ${THIS_DIR} |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
65 ${TESTJAVA}${FS}bin${FS}javac *.java |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
66 |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
67 gcc -DLINUX -fPIC -shared \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
68 -o ${TESTSRC}${FS}libTestJNI.so \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
69 -I${TESTJAVA}${FS}include \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
70 -I${TESTJAVA}${FS}include${FS}linux \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
71 ${TESTSRC}${FS}TestJNI.c |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
72 if [ $? != 0 ] |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
73 then |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
74 echo "WARNING: the gcc command failed." 2>&1 |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
75 fi |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
76 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
77 # run the java test in the background |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
78 cmd="LD_PRELOAD=$MY_LD_PRELOAD \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
79 ${TESTJAVA}${FS}bin${FS}java \ |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
80 -Djava.library.path=${TESTSRC}${FS} -server TestJNI 100" |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
81 echo "$cmd > test.out 2>&1" |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
82 eval $cmd > test.out 2>&1 |
11147
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
83 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
84 grep "old handler" test.out > ${NULL} |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
85 if [ $? = 0 ] |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
86 then |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
87 echo "Test Passed" |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
88 exit 0 |
732af649bc3a
8017498: JVM crashes when native code calls sigaction(sig) where sig>=0x20
ccheung
parents:
diff
changeset
|
89 fi |
11160
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
90 |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
91 echo "Test Failed" |
72727c4b6dec
8020791: [TESTBUG] runtime/jsig/Test8017498.sh failed to compile native code
ccheung
parents:
11147
diff
changeset
|
92 exit 1 |