author | ykantser |
Thu, 22 May 2014 11:05:36 +0200 | |
changeset 24509 | 5d02a6d25f78 |
parent 23991 | 8ed1d72acb64 |
permissions | -rw-r--r-- |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
1 |
#!/bin/sh |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
2 |
|
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
3 |
## |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
4 |
## @test Test6929067.sh |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
5 |
## @bug 6929067 |
18988
0e7cbc5c39ec
8021296: [TESTBUG] Test8017498.sh fails to find "gcc" and fails to compile on some Linux releases
ccheung
parents:
16457
diff
changeset
|
6 |
## @bug 8021296 |
22898
3f9e14c6f705
8025519: [TESTBUG] runtime/7107135/Test7107135.sh need to use COMPILEJAVA for javac task
ccheung
parents:
22516
diff
changeset
|
7 |
## @bug 8025519 |
5085
4f0c435f8c3c
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 |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
9 |
## @run shell Test6929067.sh |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
10 |
## |
22516 | 11 |
|
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
12 |
if [ "${TESTSRC}" = "" ] |
16457
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
13 |
then |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
14 |
TESTSRC=${PWD} |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
15 |
echo "TESTSRC not set. Using "${TESTSRC}" as default" |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
16 |
fi |
16457
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
17 |
echo "TESTSRC=${TESTSRC}" |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
18 |
## Adding common setup Variables for running shell tests. |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
19 |
. ${TESTSRC}/../../test_env.sh |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
20 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
21 |
if [ "${VM_OS}" != "linux" ] |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
22 |
then |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
23 |
echo "Test only valid for Linux" |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
24 |
exit 0 |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
25 |
fi |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
26 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
27 |
gcc_cmd=`which gcc` |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
28 |
if [ "x$gcc_cmd" = "x" ]; then |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
29 |
echo "WARNING: gcc not found. Cannot execute test." 2>&1 |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
30 |
exit 0; |
12729
684b5857e506
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
10565
diff
changeset
|
31 |
fi |
684b5857e506
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
10565
diff
changeset
|
32 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
33 |
CFLAGS=-m${VM_BITS} |
14080 | 34 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
35 |
LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
36 |
export LD_LIBRARY_PATH |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
37 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
38 |
cp ${TESTSRC}/*.java ${THIS_DIR} |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
39 |
${COMPILEJAVA}/bin/javac *.java |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
40 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
41 |
echo "Architecture: ${VM_CPU}" |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
42 |
echo "Compilation flag: ${CFLAGS}" |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
43 |
echo "VM type: ${VM_TYPE}" |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
44 |
echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
45 |
|
16457
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
46 |
# Note pthread may not be found thus invoke creation will fail to be created. |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
47 |
# Check to ensure you have a /usr/lib/libpthread.so if you don't please look |
92af83361777
8009152: A number of jtreg tests need review/improvement
collins
parents:
14080
diff
changeset
|
48 |
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. |
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
49 |
|
23991
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
50 |
$gcc_cmd -DLINUX ${CFLAGS} -o invoke \ |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
51 |
-I${TESTJAVA}/include -I${TESTJAVA}/include/linux \ |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
52 |
-L${TESTJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \ |
8ed1d72acb64
8037279: runtime/6929067/Test6929067.sh crashes on 32bit linux
dsamersoff
parents:
22898
diff
changeset
|
53 |
${TESTSRC}/invoke.c -ljvm -lpthread |
14080 | 54 |
|
5085
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
55 |
./invoke |
4f0c435f8c3c
6929067: Stack guard pages should be removed when thread is detached
coleenp
parents:
diff
changeset
|
56 |
exit $? |