Mercurial > hg > truffle
annotate test/runtime/6929067/Test6929067.sh @ 17809:a433eb716ce1
8037821: Account for trampoline stubs when estimating code buffer sizes
Summary: Take into account space needed for "trampoline code" used by calls on PPC64.
Reviewed-by: kvn
Contributed-by: lutz.schmidt@sap.com
author | goetz |
---|---|
date | Tue, 25 Mar 2014 12:54:21 -0700 |
parents | e567d5afd4dd |
children | e0035752234f |
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 ## |
13402
e567d5afd4dd
8028160: [TESTBUG] Exclude failing (runtime) jtreg tests using @ignore
hseigel
parents:
11967
diff
changeset
|
4 ## @ignore 8028740 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
5 ## @test Test6929067.sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
6 ## @bug 6929067 |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
7 ## @bug 8021296 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
8 ## @summary Stack guard pages should be removed when thread is detached |
6869 | 9 ## @compile T.java |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
10 ## @run shell Test6929067.sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
11 ## |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
12 set -x |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
13 if [ "${TESTSRC}" = "" ] |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
14 then |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
15 TESTSRC=${PWD} |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
16 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
17 fi |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
18 echo "TESTSRC=${TESTSRC}" |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
19 ## Adding common setup Variables for running shell tests. |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
20 . ${TESTSRC}/../../test_env.sh |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
21 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
22 # set platform-dependent variables |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
23 OS=`uname -s` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
24 case "$OS" in |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
25 Linux) |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
26 gcc_cmd=`which gcc` |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
27 if [ "x$gcc_cmd" == "x" ]; then |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
28 echo "WARNING: gcc not found. Cannot execute test." 2>&1 |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
29 exit 0; |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
30 fi |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
31 NULL=/dev/null |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
32 PS=":" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
33 FS="/" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
34 ;; |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
35 * ) |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
36 echo "Test passed; only valid for Linux" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
37 exit 0; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
38 ;; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
39 esac |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
40 |
6869 | 41 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 |
42 | |
43 # Bitness: | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
44 # 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
|
45 # 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
|
46 |
6869 | 47 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
|
48 if [ "$?" = "0" ] |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
49 then |
6869 | 50 COMP_FLAG="-m64" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
51 else |
6869 | 52 COMP_FLAG="-m32" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
53 fi |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
54 |
6869 | 55 |
56 # Architecture: | |
57 # Translate uname output to JVM directory name, but permit testing | |
58 # 32-bit x86 on an x64 platform. | |
59 ARCH=`uname -m` | |
60 case "$ARCH" in | |
61 x86_64) | |
62 if [ "$COMP_FLAG" = "-m32" ]; then | |
63 ARCH=i386 | |
64 else | |
65 ARCH=amd64 | |
66 fi | |
67 ;; | |
68 ppc64) | |
69 if [ "$COMP_FLAG" = "-m32" ]; then | |
70 ARCH=ppc | |
71 else | |
72 ARCH=ppc64 | |
73 fi | |
74 ;; | |
75 sparc64) | |
76 if [ "$COMP_FLAG" = "-m32" ]; then | |
77 ARCH=sparc | |
78 else | |
79 ARCH=sparc64 | |
80 fi | |
81 ;; | |
82 arm*) | |
83 # 32-bit ARM machine: compiler may not recognise -m32 | |
84 COMP_FLAG="" | |
85 ARCH=arm | |
86 ;; | |
87 aarch64) | |
88 # 64-bit arm machine, could be testing 32 or 64-bit: | |
89 if [ "$COMP_FLAG" = "-m32" ]; then | |
90 ARCH=arm | |
91 else | |
92 ARCH=aarch64 | |
93 fi | |
94 ;; | |
95 i586) | |
96 ARCH=i386 | |
97 ;; | |
98 i686) | |
99 ARCH=i386 | |
100 ;; | |
101 # Assuming other ARCH values need no translation | |
102 esac | |
103 | |
104 | |
105 # VM type: need to know server or client | |
106 VMTYPE=client | |
107 grep Server vm_version.out > ${NULL} | |
108 if [ "$?" = "0" ] | |
109 then | |
110 VMTYPE=server | |
111 fi | |
112 | |
113 | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
114 LD_LIBRARY_PATH=.:${COMPILEJAVA}/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
|
115 export LD_LIBRARY_PATH |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
116 |
6869 | 117 cp ${TESTSRC}${FS}invoke.c . |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
118 |
6869 | 119 # Copy the result of our @compile action: |
120 cp ${TESTCLASSES}${FS}T.class . | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
121 |
6869 | 122 echo "Architecture: ${ARCH}" |
123 echo "Compilation flag: ${COMP_FLAG}" | |
124 echo "VM type: ${VMTYPE}" | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
125 # Note pthread may not be found thus invoke creation will fail to be created. |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
126 # Check to ensure you have a /usr/lib/libpthread.so if you don't please look |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
127 # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
128 |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
129 $gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \ |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
130 -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
131 -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
132 -ljvm -lpthread invoke.c |
6869 | 133 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
134 ./invoke |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
135 exit $? |