test/runtime/jsig/Test8017498.sh

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 6133
e567d5afd4dd
child 6876
710a3c8b516e
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

     1 #!/bin/sh
     3 #
     4 #  Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     5 #  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6 #
     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
     9 #  published by the Free Software Foundation.
    10 #
    11 #  This code is distributed in the hope that it will be useful, but WITHOUT
    12 #  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13 #  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14 #  version 2 for more details (a copy is included in the LICENSE file that
    15 #  accompanied this code).
    16 #
    17 #  You should have received a copy of the GNU General Public License version
    18 #  2 along with this work; if not, write to the Free Software Foundation,
    19 #  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20 #
    21 #  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22 #  or visit www.oracle.com if you need additional information or have any
    23 #  questions.
    24 #
    26 ##
    27 ## @ignore 8028806
    28 ## @test Test8017498.sh
    29 ## @bug 8017498
    30 ## @bug 8020791
    31 ## @bug 8021296
    32 ## @summary sigaction(sig) results in process hang/timed-out if sig is much greater than SIGRTMAX
    33 ## @run shell/timeout=30 Test8017498.sh
    34 ##
    36 if [ "${TESTSRC}" = "" ]
    37 then
    38   TESTSRC=${PWD}
    39   echo "TESTSRC not set.  Using "${TESTSRC}" as default"
    40 fi
    41 echo "TESTSRC=${TESTSRC}"
    42 ## Adding common setup Variables for running shell tests.
    43 . ${TESTSRC}/../../test_env.sh
    45 # set platform-dependent variables
    46 OS=`uname -s`
    47 case "$OS" in
    48   Linux)
    49     echo "Testing on Linux"
    50     gcc_cmd=`which gcc`
    51     if [ "x$gcc_cmd" == "x" ]; then
    52         echo "WARNING: gcc not found. Cannot execute test." 2>&1
    53         exit 0;
    54     fi
    55     if [ "$VM_BITS" = "64" ]
    56     then
    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
    60     fi
    61     echo MY_LD_PRELOAD = ${MY_LD_PRELOAD}
    62     ;;
    63   *)
    64     echo "Test passed; only valid for Linux"
    65     exit 0;
    66     ;;
    67 esac
    69 THIS_DIR=.
    71 cp ${TESTSRC}${FS}*.java ${THIS_DIR}
    72 ${TESTJAVA}${FS}bin${FS}javac *.java
    74 $gcc_cmd -DLINUX -fPIC -shared \
    75     -o ${TESTSRC}${FS}libTestJNI.so \
    76     -I${TESTJAVA}${FS}include \
    77     -I${TESTJAVA}${FS}include${FS}linux \
    78     ${TESTSRC}${FS}TestJNI.c
    80 # run the java test in the background
    81 cmd="LD_PRELOAD=$MY_LD_PRELOAD \
    82     ${TESTJAVA}${FS}bin${FS}java \
    83     -Djava.library.path=${TESTSRC}${FS} -server TestJNI 100"
    84 echo "$cmd > test.out 2>&1"
    85 eval $cmd > test.out 2>&1
    87 grep "old handler" test.out > ${NULL}
    88 if [ $? = 0 ]
    89 then
    90     echo "Test Passed"
    91     exit 0
    92 fi
    94 echo "Test Failed"
    95 exit 1

mercurial