Mercurial > hg > truffle
annotate test/runtime/6929067/Test6929067.sh @ 14512:484a359ff649
8031754: Type speculation should favor profile data from outermost inlined method
Summary: favor profile data coming from outer most method
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Fri, 28 Feb 2014 13:44:16 +0100 |
parents | e0035752234f |
children | 5e7eb4244604 |
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 |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
6 ## @bug 8021296 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
7 ## @summary Stack guard pages should be removed when thread is detached |
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 ## |
14274 | 10 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
11 if [ "${TESTSRC}" = "" ] |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
12 then |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
13 TESTSRC=${PWD} |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
14 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
|
15 fi |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
16 echo "TESTSRC=${TESTSRC}" |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
17 ## Adding common setup Variables for running shell tests. |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
18 . ${TESTSRC}/../../test_env.sh |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
19 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
20 # set platform-dependent variables |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
21 OS=`uname -s` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
22 case "$OS" in |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
23 Linux) |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
24 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
|
25 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
|
26 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
|
27 exit 0; |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
28 fi |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
29 NULL=/dev/null |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
30 PS=":" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
31 FS="/" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
32 ;; |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
33 * ) |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
34 echo "Test passed; only valid for Linux" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
35 exit 0; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
36 ;; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
37 esac |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
38 |
6869 | 39 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 |
40 | |
41 # Bitness: | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
42 # 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
|
43 # 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
|
44 |
6869 | 45 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
|
46 if [ "$?" = "0" ] |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
47 then |
6869 | 48 COMP_FLAG="-m64" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
49 else |
6869 | 50 COMP_FLAG="-m32" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
51 fi |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
52 |
6869 | 53 |
54 # Architecture: | |
55 # Translate uname output to JVM directory name, but permit testing | |
56 # 32-bit x86 on an x64 platform. | |
57 ARCH=`uname -m` | |
58 case "$ARCH" in | |
59 x86_64) | |
60 if [ "$COMP_FLAG" = "-m32" ]; then | |
61 ARCH=i386 | |
62 else | |
63 ARCH=amd64 | |
64 fi | |
65 ;; | |
66 ppc64) | |
67 if [ "$COMP_FLAG" = "-m32" ]; then | |
68 ARCH=ppc | |
69 else | |
70 ARCH=ppc64 | |
71 fi | |
72 ;; | |
73 sparc64) | |
74 if [ "$COMP_FLAG" = "-m32" ]; then | |
75 ARCH=sparc | |
76 else | |
77 ARCH=sparc64 | |
78 fi | |
79 ;; | |
80 arm*) | |
81 # 32-bit ARM machine: compiler may not recognise -m32 | |
82 COMP_FLAG="" | |
83 ARCH=arm | |
84 ;; | |
85 aarch64) | |
86 # 64-bit arm machine, could be testing 32 or 64-bit: | |
87 if [ "$COMP_FLAG" = "-m32" ]; then | |
88 ARCH=arm | |
89 else | |
90 ARCH=aarch64 | |
91 fi | |
92 ;; | |
93 i586) | |
94 ARCH=i386 | |
95 ;; | |
96 i686) | |
97 ARCH=i386 | |
98 ;; | |
99 # Assuming other ARCH values need no translation | |
100 esac | |
101 | |
102 | |
103 # VM type: need to know server or client | |
104 VMTYPE=client | |
105 grep Server vm_version.out > ${NULL} | |
106 if [ "$?" = "0" ] | |
107 then | |
108 VMTYPE=server | |
109 fi | |
110 | |
111 | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
112 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
|
113 export LD_LIBRARY_PATH |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
114 |
14274 | 115 cp ${TESTSRC}${FS}*.java ${THIS_DIR} |
116 ${TESTJAVA}${FS}bin${FS}javac *.java | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
117 |
6869 | 118 echo "Architecture: ${ARCH}" |
119 echo "Compilation flag: ${COMP_FLAG}" | |
120 echo "VM type: ${VMTYPE}" | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
121 # 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
|
122 # 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
|
123 # 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
|
124 |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
125 $gcc_cmd -DLINUX ${COMP_FLAG} -o invoke \ |
14274 | 126 -I${TESTJAVA}/include -I${TESTJAVA}/include/linux \ |
127 -L${TESTJAVA}/jre/lib/${ARCH}/${VMTYPE} \ | |
128 ${TESTSRC}${FS}invoke.c -ljvm -lpthread | |
6869 | 129 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
130 ./invoke |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
131 exit $? |