1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/mips64/11080/test.sh Mon Nov 25 15:36:48 2019 +0800 1.3 @@ -0,0 +1,74 @@ 1.4 +#!/bin/bash 1.5 + 1.6 +# 1.7 +# Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. 1.8 +# Copyright (c) 2019, Loongson Technology. All rights reserved. 1.9 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.10 +# 1.11 +# This code is free software; you can redistribute it and/or modify it 1.12 +# under the terms of the GNU General Public License version 2 only, as 1.13 +# published by the Free Software Foundation. 1.14 +# 1.15 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.16 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.17 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.18 +# version 2 for more details (a copy is included in the LICENSE file that 1.19 +# accompanied this code). 1.20 +# 1.21 +# You should have received a copy of the GNU General Public License version 1.22 +# 2 along with this work; if not, write to the Free Software Foundation, 1.23 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.24 +# 1.25 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.26 +# or visit www.oracle.com if you need additional information or have any 1.27 +# questions. 1.28 +# 1.29 + 1.30 +## 1.31 +## @test test.sh 1.32 +## @bug 8207838 1.33 +## @summary Regression test for passing float args to a synchronized jni function. 1.34 +## @run shell test.sh 1.35 +## 1.36 + 1.37 +if [ "${TESTSRC}" = "" ] 1.38 +then 1.39 + TESTSRC=${PWD} 1.40 + echo "TESTSRC not set. Using "${TESTSRC}" as default" 1.41 +fi 1.42 +echo "TESTSRC=${TESTSRC}" 1.43 +## Adding common setup Variables for running shell tests. 1.44 +. ${TESTSRC}/../../test_env.sh 1.45 + 1.46 +# set platform-dependent variables 1.47 +OS=`uname -s` 1.48 +echo "Testing on " $OS 1.49 +case "$OS" in 1.50 + Linux) 1.51 + cc_cmd=`which gcc` 1.52 + if [ "x$cc_cmd" == "x" ]; then 1.53 + echo "WARNING: gcc not found. Cannot execute test." 2>&1 1.54 + exit 0; 1.55 + fi 1.56 + ;; 1.57 + *) 1.58 + echo "Test passed; only valid for Linux" 1.59 + exit 0; 1.60 + ;; 1.61 +esac 1.62 + 1.63 +THIS_DIR=. 1.64 + 1.65 +cp ${TESTSRC}${FS}TestFloatSyncJNIArgs.java ${THIS_DIR} 1.66 +${TESTJAVA}${FS}bin${FS}javac TestFloatSyncJNIArgs.java 1.67 + 1.68 +$cc_cmd -fPIC -shared \ 1.69 + -o libTestFloatSyncJNIArgs.so \ 1.70 + -I${TESTJAVA}${FS}include \ 1.71 + -I${TESTJAVA}${FS}include${FS}linux \ 1.72 + ${TESTSRC}${FS}libTestFloatSyncJNIArgs.c 1.73 + 1.74 +${TESTJAVA}${FS}bin${FS}java \ 1.75 + -Djava.library.path=${THIS_DIR} TestFloatSyncJNIArgs 1.76 + 1.77 +exit $?