Mercurial > hg > graal-compiler
annotate test/runtime/6929067/Test6929067.sh @ 12137:f462e61bce87
8020622: create.bat on Windows failed to create project file for Visual Studio 2012
Summary: Treat VS2012 the same as VS2010.
Reviewed-by: dcubed, kamg, minqi
author | iklam |
---|---|
date | Mon, 26 Aug 2013 21:59:50 -0700 |
parents | f9ee986a9fea |
children | e567d5afd4dd |
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 |
6869 | 8 ## @compile T.java |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
9 ## @run shell Test6929067.sh |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
10 ## |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
11 set -x |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
12 if [ "${TESTSRC}" = "" ] |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
13 then |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
14 TESTSRC=${PWD} |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
15 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
|
16 fi |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
17 echo "TESTSRC=${TESTSRC}" |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
18 ## Adding common setup Variables for running shell tests. |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
19 . ${TESTSRC}/../../test_env.sh |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
20 |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
21 # set platform-dependent variables |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
22 OS=`uname -s` |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
23 case "$OS" in |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
24 Linux) |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
25 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
|
26 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
|
27 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
|
28 exit 0; |
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
29 fi |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
30 NULL=/dev/null |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
31 PS=":" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
32 FS="/" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
33 ;; |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
34 * ) |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
35 echo "Test passed; only valid for Linux" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
36 exit 0; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
37 ;; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
38 esac |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
39 |
6869 | 40 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 |
41 | |
42 # Bitness: | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
43 # 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
|
44 # 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
|
45 |
6869 | 46 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
|
47 if [ "$?" = "0" ] |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
48 then |
6869 | 49 COMP_FLAG="-m64" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
50 else |
6869 | 51 COMP_FLAG="-m32" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
52 fi |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
53 |
6869 | 54 |
55 # Architecture: | |
56 # Translate uname output to JVM directory name, but permit testing | |
57 # 32-bit x86 on an x64 platform. | |
58 ARCH=`uname -m` | |
59 case "$ARCH" in | |
60 x86_64) | |
61 if [ "$COMP_FLAG" = "-m32" ]; then | |
62 ARCH=i386 | |
63 else | |
64 ARCH=amd64 | |
65 fi | |
66 ;; | |
67 ppc64) | |
68 if [ "$COMP_FLAG" = "-m32" ]; then | |
69 ARCH=ppc | |
70 else | |
71 ARCH=ppc64 | |
72 fi | |
73 ;; | |
74 sparc64) | |
75 if [ "$COMP_FLAG" = "-m32" ]; then | |
76 ARCH=sparc | |
77 else | |
78 ARCH=sparc64 | |
79 fi | |
80 ;; | |
81 arm*) | |
82 # 32-bit ARM machine: compiler may not recognise -m32 | |
83 COMP_FLAG="" | |
84 ARCH=arm | |
85 ;; | |
86 aarch64) | |
87 # 64-bit arm machine, could be testing 32 or 64-bit: | |
88 if [ "$COMP_FLAG" = "-m32" ]; then | |
89 ARCH=arm | |
90 else | |
91 ARCH=aarch64 | |
92 fi | |
93 ;; | |
94 i586) | |
95 ARCH=i386 | |
96 ;; | |
97 i686) | |
98 ARCH=i386 | |
99 ;; | |
100 # Assuming other ARCH values need no translation | |
101 esac | |
102 | |
103 | |
104 # VM type: need to know server or client | |
105 VMTYPE=client | |
106 grep Server vm_version.out > ${NULL} | |
107 if [ "$?" = "0" ] | |
108 then | |
109 VMTYPE=server | |
110 fi | |
111 | |
112 | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
113 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
|
114 export LD_LIBRARY_PATH |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
115 |
6869 | 116 cp ${TESTSRC}${FS}invoke.c . |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
117 |
6869 | 118 # Copy the result of our @compile action: |
119 cp ${TESTCLASSES}${FS}T.class . | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
120 |
6869 | 121 echo "Architecture: ${ARCH}" |
122 echo "Compilation flag: ${COMP_FLAG}" | |
123 echo "VM type: ${VMTYPE}" | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
124 # 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
|
125 # 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
|
126 # 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
|
127 |
11967
f9ee986a9fea
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
8831
diff
changeset
|
128 $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
|
129 -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
|
130 -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
|
131 -ljvm -lpthread invoke.c |
6869 | 132 |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
133 ./invoke |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
134 exit $? |