Mercurial > hg > truffle
annotate test/runtime/6929067/Test6929067.sh @ 11517:1f03076a121b
Merge
author | Mick Jordan <mick.jordan@oracle.com> |
---|---|
date | Tue, 03 Sep 2013 14:09:56 -0700 |
parents | 04d6d4322c6a |
children | f9ee986a9fea |
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 ## |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
10 set -x |
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) |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
24 NULL=/dev/null |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
25 PS=":" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
26 FS="/" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
27 ;; |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
28 * ) |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
29 echo "Test passed; only valid for Linux" |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
30 exit 0; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
31 ;; |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
32 esac |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
33 |
6869 | 34 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion > vm_version.out 2>&1 |
35 | |
36 # Bitness: | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
37 # 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
|
38 # 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
|
39 |
6869 | 40 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
|
41 if [ "$?" = "0" ] |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
42 then |
6869 | 43 COMP_FLAG="-m64" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
44 else |
6869 | 45 COMP_FLAG="-m32" |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
46 fi |
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
3960
diff
changeset
|
47 |
6869 | 48 |
49 # Architecture: | |
50 # Translate uname output to JVM directory name, but permit testing | |
51 # 32-bit x86 on an x64 platform. | |
52 ARCH=`uname -m` | |
53 case "$ARCH" in | |
54 x86_64) | |
55 if [ "$COMP_FLAG" = "-m32" ]; then | |
56 ARCH=i386 | |
57 else | |
58 ARCH=amd64 | |
59 fi | |
60 ;; | |
61 ppc64) | |
62 if [ "$COMP_FLAG" = "-m32" ]; then | |
63 ARCH=ppc | |
64 else | |
65 ARCH=ppc64 | |
66 fi | |
67 ;; | |
68 sparc64) | |
69 if [ "$COMP_FLAG" = "-m32" ]; then | |
70 ARCH=sparc | |
71 else | |
72 ARCH=sparc64 | |
73 fi | |
74 ;; | |
75 arm*) | |
76 # 32-bit ARM machine: compiler may not recognise -m32 | |
77 COMP_FLAG="" | |
78 ARCH=arm | |
79 ;; | |
80 aarch64) | |
81 # 64-bit arm machine, could be testing 32 or 64-bit: | |
82 if [ "$COMP_FLAG" = "-m32" ]; then | |
83 ARCH=arm | |
84 else | |
85 ARCH=aarch64 | |
86 fi | |
87 ;; | |
88 i586) | |
89 ARCH=i386 | |
90 ;; | |
91 i686) | |
92 ARCH=i386 | |
93 ;; | |
94 # Assuming other ARCH values need no translation | |
95 esac | |
96 | |
97 | |
98 # VM type: need to know server or client | |
99 VMTYPE=client | |
100 grep Server vm_version.out > ${NULL} | |
101 if [ "$?" = "0" ] | |
102 then | |
103 VMTYPE=server | |
104 fi | |
105 | |
106 | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
107 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
|
108 export LD_LIBRARY_PATH |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
109 |
6869 | 110 cp ${TESTSRC}${FS}invoke.c . |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
111 |
6869 | 112 # Copy the result of our @compile action: |
113 cp ${TESTCLASSES}${FS}T.class . | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
114 |
6869 | 115 echo "Architecture: ${ARCH}" |
116 echo "Compilation flag: ${COMP_FLAG}" | |
117 echo "VM type: ${VMTYPE}" | |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
118 # 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
|
119 # 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
|
120 # 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
|
121 |
6869 | 122 gcc -DLINUX ${COMP_FLAG} -o invoke \ |
8831
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
123 -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ |
04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
collins
parents:
6869
diff
changeset
|
124 -L${COMPILEJAVA}/jre/lib/${ARCH}/${VMTYPE} \ |
6869 | 125 -ljvm -lpthread invoke.c |
126 | |
1320
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
127 ./invoke |
3b3d12e645e7
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
128 exit $? |