Mercurial > hg > truffle
annotate test/runtime/6929067/Test6929067.sh @ 8128:2223b68006cd
Avoid saving rsp in rbp.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 06 Mar 2013 16:38:15 +0100 |
parents | e0ea0e94c23c |
children | 04d6d4322c6a |
rev | line source |
---|---|
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
1 #!/bin/sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
2 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
3 ## |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
4 ## @test Test6929067.sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
5 ## @bug 6929067 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
6 ## @summary Stack guard pages should be removed when thread is detached |
6869 | 7 ## @compile T.java |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
8 ## @run shell Test6929067.sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
9 ## |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
10 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
11 if [ "${TESTSRC}" = "" ] |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
12 then TESTSRC=. |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
13 fi |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
14 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
15 if [ "${TESTJAVA}" = "" ] |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
16 then |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
17 PARENT=`dirname \`which java\`` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
18 TESTJAVA=`dirname ${PARENT}` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
19 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
20 echo "If this is incorrect, try setting the variable manually." |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
21 fi |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
22 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
23 # set platform-dependent variables |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
24 OS=`uname -s` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
25 case "$OS" in |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
26 Linux) |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
27 NULL=/dev/null |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
28 PS=":" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
29 FS="/" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
30 ;; |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
31 * ) |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
32 echo "Test passed; only valid for Linux" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
33 exit 0; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
34 ;; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
35 esac |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
36 |
6869 | 37 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 |
38 | |
39 # Bitness: | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
40 # Cannot simply look at TESTVMOPTS as -d64 is not |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
41 # passed if there is only a 64-bit JVM available. |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
42 |
6869 | 43 grep "64-Bit" vm_version.out > ${NULL} |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
44 if [ "$?" = "0" ] |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
45 then |
6869 | 46 COMP_FLAG="-m64" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
47 else |
6869 | 48 COMP_FLAG="-m32" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
49 fi |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
50 |
6869 | 51 |
52 # Architecture: | |
53 # Translate uname output to JVM directory name, but permit testing | |
54 # 32-bit x86 on an x64 platform. | |
55 ARCH=`uname -m` | |
56 case "$ARCH" in | |
57 x86_64) | |
58 if [ "$COMP_FLAG" = "-m32" ]; then | |
59 ARCH=i386 | |
60 else | |
61 ARCH=amd64 | |
62 fi | |
63 ;; | |
64 ppc64) | |
65 if [ "$COMP_FLAG" = "-m32" ]; then | |
66 ARCH=ppc | |
67 else | |
68 ARCH=ppc64 | |
69 fi | |
70 ;; | |
71 sparc64) | |
72 if [ "$COMP_FLAG" = "-m32" ]; then | |
73 ARCH=sparc | |
74 else | |
75 ARCH=sparc64 | |
76 fi | |
77 ;; | |
78 arm*) | |
79 # 32-bit ARM machine: compiler may not recognise -m32 | |
80 COMP_FLAG="" | |
81 ARCH=arm | |
82 ;; | |
83 aarch64) | |
84 # 64-bit arm machine, could be testing 32 or 64-bit: | |
85 if [ "$COMP_FLAG" = "-m32" ]; then | |
86 ARCH=arm | |
87 else | |
88 ARCH=aarch64 | |
89 fi | |
90 ;; | |
91 i586) | |
92 ARCH=i386 | |
93 ;; | |
94 i686) | |
95 ARCH=i386 | |
96 ;; | |
97 # Assuming other ARCH values need no translation | |
98 esac | |
99 | |
100 | |
101 # VM type: need to know server or client | |
102 VMTYPE=client | |
103 grep Server vm_version.out > ${NULL} | |
104 if [ "$?" = "0" ] | |
105 then | |
106 VMTYPE=server | |
107 fi | |
108 | |
109 | |
110 LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE}:/usr/lib:$LD_LIBRARY_PATH | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
111 export LD_LIBRARY_PATH |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
112 |
6869 | 113 cp ${TESTSRC}${FS}invoke.c . |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
114 |
6869 | 115 # Copy the result of our @compile action: |
116 cp ${TESTCLASSES}${FS}T.class . | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
117 |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
118 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
119 |
6869 | 120 echo "Architecture: ${ARCH}" |
121 echo "Compilation flag: ${COMP_FLAG}" | |
122 echo "VM type: ${VMTYPE}" | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
123 |
6869 | 124 gcc -DLINUX ${COMP_FLAG} -o invoke \ |
125 -I${TESTJAVA}/include -I${TESTJAVA}/include/linux \ | |
126 -L${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE} \ | |
127 -ljvm -lpthread invoke.c | |
128 | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
129 ./invoke |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
130 exit $? |