test/runtime/InitialThreadOverflow/testme.sh

Mon, 06 Nov 2017 16:51:47 +0800

author
aoqi
date
Mon, 06 Nov 2017 16:51:47 +0800
changeset 7997
6cbff0651f1a
parent 7994
04ff2f6cd0eb
permissions
-rw-r--r--

[Code Reorganization] remove trailing whitespace to pass jcheck test

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

mercurial