test/runtime/6929067/Test6929067.sh

Thu, 20 Sep 2012 13:44:28 -0700

author
katleman
date
Thu, 20 Sep 2012 13:44:28 -0700
changeset 4035
da0d652d0c2f
parent 3985
6acee021f5ac
child 4180
e0ea0e94c23c
permissions
-rw-r--r--

Added tag jdk8-b57 for changeset d70102c4cb73

coleenp@1755 1 #!/bin/sh
coleenp@1755 2
coleenp@1755 3 ##
coleenp@1755 4 ## @test Test6929067.sh
coleenp@1755 5 ## @bug 6929067
coleenp@1755 6 ## @summary Stack guard pages should be removed when thread is detached
coleenp@1755 7 ## @run shell Test6929067.sh
coleenp@1755 8 ##
coleenp@1755 9
coleenp@1755 10 if [ "${TESTSRC}" = "" ]
coleenp@1755 11 then TESTSRC=.
coleenp@1755 12 fi
coleenp@1755 13
coleenp@1755 14 if [ "${TESTJAVA}" = "" ]
coleenp@1755 15 then
coleenp@1755 16 PARENT=`dirname \`which java\``
coleenp@1755 17 TESTJAVA=`dirname ${PARENT}`
coleenp@1755 18 echo "TESTJAVA not set, selecting " ${TESTJAVA}
coleenp@1755 19 echo "If this is incorrect, try setting the variable manually."
coleenp@1755 20 fi
coleenp@1755 21
coleenp@1755 22 # set platform-dependent variables
coleenp@1755 23 OS=`uname -s`
coleenp@1755 24 case "$OS" in
coleenp@1755 25 Linux)
coleenp@1755 26 NULL=/dev/null
coleenp@1755 27 PS=":"
coleenp@1755 28 FS="/"
coleenp@1755 29 ;;
coleenp@3985 30 * )
coleenp@1755 31 echo "Test passed; only valid for Linux"
coleenp@1755 32 exit 0;
coleenp@1755 33 ;;
coleenp@1755 34 esac
coleenp@1755 35
kevinw@3777 36 # Choose arch: i386 or amd64 (test is Linux-specific)
kevinw@3777 37 # Cannot simply look at TESTVMOPTS as -d64 is not
kevinw@3777 38 # passed if there is only a 64-bit JVM available.
kevinw@3777 39
kevinw@3777 40 ${TESTJAVA}/bin/java ${TESTVMOPTS} -version 2>1 | grep "64-Bit" >/dev/null
kevinw@3777 41 if [ "$?" = "0" ]
kevinw@3777 42 then
kevinw@3777 43 ARCH=amd64
kevinw@3777 44 else
kevinw@3777 45 ARCH=i386
kevinw@3777 46 fi
kevinw@3777 47
kevinw@3777 48 LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/${ARCH}/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH
coleenp@1755 49 export LD_LIBRARY_PATH
coleenp@1755 50
coleenp@1755 51 THIS_DIR=`pwd`
coleenp@1755 52
coleenp@1755 53 cp ${TESTSRC}${FS}invoke.c ${THIS_DIR}
coleenp@1755 54 cp ${TESTSRC}${FS}T.java ${THIS_DIR}
coleenp@1755 55
coleenp@1755 56
kevinw@3777 57 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
coleenp@1755 58
coleenp@1755 59 ${TESTJAVA}${FS}bin${FS}javac T.java
coleenp@1755 60
kevinw@3777 61 gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/${ARCH}/client/libjvm.so
coleenp@1755 62 ./invoke
coleenp@1755 63 exit $?

mercurial