comparison test/runtime/jsig/Test8017498.sh @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 5e7eb4244604
children
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # 3 #
4 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. 4 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 # 6 #
7 # This code is free software; you can redistribute it and/or modify it 7 # This code is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License version 2 only, as 8 # under the terms of the GNU General Public License version 2 only, as
9 # published by the Free Software Foundation. 9 # published by the Free Software Foundation.
27 ## @ignore 8028806 27 ## @ignore 8028806
28 ## @test Test8017498.sh 28 ## @test Test8017498.sh
29 ## @bug 8017498 29 ## @bug 8017498
30 ## @bug 8020791 30 ## @bug 8020791
31 ## @bug 8021296 31 ## @bug 8021296
32 ## @bug 8022301
33 ## @bug 8025519
34 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX 32 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
35 ## @run shell/timeout=60 Test8017498.sh 33 ## @run shell/timeout=30 Test8017498.sh
36 ## 34 ##
37 35
38 if [ "${TESTSRC}" = "" ] 36 if [ "${TESTSRC}" = "" ]
39 then 37 then
40 TESTSRC=${PWD} 38 TESTSRC=${PWD}
42 fi 40 fi
43 echo "TESTSRC=${TESTSRC}" 41 echo "TESTSRC=${TESTSRC}"
44 ## Adding common setup Variables for running shell tests. 42 ## Adding common setup Variables for running shell tests.
45 . ${TESTSRC}/../../test_env.sh 43 . ${TESTSRC}/../../test_env.sh
46 44
47 EXTRA_CFLAG=
48
49 # set platform-dependent variables 45 # set platform-dependent variables
50 OS=`uname -s` 46 OS=`uname -s`
51 case "$OS" in 47 case "$OS" in
52 Linux) 48 Linux)
53 echo "Testing on Linux" 49 echo "Testing on Linux"
54 gcc_cmd=`which gcc` 50 gcc_cmd=`which gcc`
55 if [ "x$gcc_cmd" == "x" ]; then 51 if [ "x$gcc_cmd" == "x" ]; then
56 echo "WARNING: gcc not found. Cannot execute test." 2>&1 52 echo "WARNING: gcc not found. Cannot execute test." 2>&1
57 exit 0; 53 exit 0;
58 fi 54 fi
59 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}${VM_CPU}${FS}libjsig.so 55 if [ "$VM_BITS" = "64" ]
60 if [ "$VM_BITS" == "32" ] && [ "$VM_CPU" != "arm" ] && [ "$VM_CPU" != "ppc" ]; then 56 then
61 EXTRA_CFLAG=-m32 57 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}amd64${FS}libjsig.so
58 else
59 MY_LD_PRELOAD=${TESTJAVA}${FS}jre${FS}lib${FS}i386${FS}libjsig.so
62 fi 60 fi
63 echo MY_LD_PRELOAD = ${MY_LD_PRELOAD} 61 echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
64 ;; 62 ;;
65 *) 63 *)
66 echo "Test passed; only valid for Linux" 64 echo "Test passed; only valid for Linux"
69 esac 67 esac
70 68
71 THIS_DIR=. 69 THIS_DIR=.
72 70
73 cp ${TESTSRC}${FS}*.java ${THIS_DIR} 71 cp ${TESTSRC}${FS}*.java ${THIS_DIR}
74 ${COMPILEJAVA}${FS}bin${FS}javac *.java 72 ${TESTJAVA}${FS}bin${FS}javac *.java
75 73
76 $gcc_cmd -DLINUX -fPIC -shared \ 74 $gcc_cmd -DLINUX -fPIC -shared \
77 ${EXTRA_CFLAG} -z noexecstack \
78 -o ${TESTSRC}${FS}libTestJNI.so \ 75 -o ${TESTSRC}${FS}libTestJNI.so \
79 -I${COMPILEJAVA}${FS}include \ 76 -I${TESTJAVA}${FS}include \
80 -I${COMPILEJAVA}${FS}include${FS}linux \ 77 -I${TESTJAVA}${FS}include${FS}linux \
81 ${TESTSRC}${FS}TestJNI.c 78 ${TESTSRC}${FS}TestJNI.c
82 79
83 # run the java test in the background 80 # run the java test in the background
84 cmd="LD_PRELOAD=$MY_LD_PRELOAD \ 81 cmd="LD_PRELOAD=$MY_LD_PRELOAD \
85 ${TESTJAVA}${FS}bin${FS}java \ 82 ${TESTJAVA}${FS}bin${FS}java \