Mercurial > hg > truffle
annotate test/runtime/InitialThreadOverflow/testme.sh @ 16734:7d7fae9e9d17
merge
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Sat, 09 Aug 2014 08:51:01 -0700 |
parents | e567d5afd4dd |
children |
rev | line source |
---|---|
12144
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
1 #!/bin/sh |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
2 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
3 # Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
5 # |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
6 # This code is free software; you can redistribute it and/or modify it |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
7 # under the terms of the GNU General Public License version 2 only, as |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
8 # published by the Free Software Foundation. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
9 # |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
10 # This code is distributed in the hope that it will be useful, but WITHOUT |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
13 # version 2 for more details (a copy is included in the LICENSE file that |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
14 # accompanied this code). |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
15 # |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
16 # You should have received a copy of the GNU General Public License version |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
17 # 2 along with this work; if not, write to the Free Software Foundation, |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
19 # |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
21 # or visit www.oracle.com if you need additional information or have any |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
22 # questions. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
23 |
13402
e567d5afd4dd
8028160: [TESTBUG] Exclude failing (runtime) jtreg tests using @ignore
hseigel
parents:
12202
diff
changeset
|
24 # @ignore 8029139 |
12144
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
25 # @test testme.sh |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
26 # @bug 8009062 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
27 # @summary Poor performance of JNI AttachCurrentThread after fix for 7017193 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
28 # @compile DoOverflow.java |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
29 # @run shell testme.sh |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
30 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
31 set -x |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
32 if [ "${TESTSRC}" = "" ] |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
33 then |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
34 TESTSRC=${PWD} |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
35 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
36 fi |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
37 echo "TESTSRC=${TESTSRC}" |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
38 ## Adding common setup Variables for running shell tests. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
39 . ${TESTSRC}/../../test_env.sh |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
40 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
41 if [ "${VM_OS}" != "linux" ] |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
42 then |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
43 echo "Test only valid for Linux" |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
44 exit 0 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
45 fi |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
46 |
12202
0f648fbe4404
8024056: runtime/InitialThreadOverflow/testme.sh fails
dsamersoff
parents:
12144
diff
changeset
|
47 gcc_cmd=`which g++` |
0f648fbe4404
8024056: runtime/InitialThreadOverflow/testme.sh fails
dsamersoff
parents:
12144
diff
changeset
|
48 if [ "x$gcc_cmd" = "x" ]; then |
0f648fbe4404
8024056: runtime/InitialThreadOverflow/testme.sh fails
dsamersoff
parents:
12144
diff
changeset
|
49 echo "WARNING: g++ not found. Cannot execute test." 2>&1 |
12144
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
50 exit 0; |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
51 fi |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
52 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
53 CFLAGS="-m${VM_BITS}" |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
54 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
55 LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
56 export LD_LIBRARY_PATH |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
57 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
58 cp ${TESTSRC}${FS}invoke.cxx . |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
59 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
60 # Copy the result of our @compile action: |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
61 cp ${TESTCLASSES}${FS}DoOverflow.class . |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
62 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
63 echo "Compilation flag: ${COMP_FLAG}" |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
64 # Note pthread may not be found thus invoke creation will fail to be created. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
65 # Check to ensure you have a /usr/lib/libpthread.so if you don't please look |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
66 # for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation. |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
67 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
68 $gcc_cmd -DLINUX ${CFLAGS} -o invoke \ |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
69 -I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \ |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
70 -L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \ |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
71 -ljvm -lpthread invoke.cxx |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
72 |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
73 ./invoke |
d8e99408faad
8009062: poor performance of JNI AttachCurrentThread after fix for 7017193
dsamersoff
parents:
diff
changeset
|
74 exit $? |