test/runtime/InitialThreadOverflow/testme.sh

Wed, 22 Jan 2014 12:37:28 -0800

author
katleman
date
Wed, 22 Jan 2014 12:37:28 -0800
changeset 6575
2bac854670c0
parent 6133
e567d5afd4dd
child 6876
710a3c8b516e
child 7893
a5b77ac78ad2
permissions
-rw-r--r--

Added tag jdk8u5-b05 for changeset b90de55aca30

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

mercurial