Fri, 03 Feb 2012 18:04:11 -0800
Added tag hs23-b13 for changeset b22de8247499
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 | BIT_FLAG="" |
coleenp@1755 | 23 | |
coleenp@1755 | 24 | # set platform-dependent variables |
coleenp@1755 | 25 | OS=`uname -s` |
coleenp@1755 | 26 | case "$OS" in |
coleenp@1755 | 27 | Linux) |
coleenp@1755 | 28 | NULL=/dev/null |
coleenp@1755 | 29 | PS=":" |
coleenp@1755 | 30 | FS="/" |
coleenp@1755 | 31 | ;; |
never@3156 | 32 | SunOS | Windows_* | *BSD) |
coleenp@1755 | 33 | NULL=NUL |
coleenp@1755 | 34 | PS=";" |
coleenp@1755 | 35 | FS="\\" |
coleenp@1755 | 36 | echo "Test passed; only valid for Linux" |
coleenp@1755 | 37 | exit 0; |
coleenp@1755 | 38 | ;; |
coleenp@1755 | 39 | * ) |
coleenp@1755 | 40 | echo "Unrecognized system!" |
coleenp@1755 | 41 | exit 1; |
coleenp@1755 | 42 | ;; |
coleenp@1755 | 43 | esac |
coleenp@1755 | 44 | |
coleenp@1755 | 45 | LD_LIBRARY_PATH=.:${TESTJAVA}/jre/lib/i386/client:/usr/openwin/lib:/usr/dt/lib:/usr/lib:$LD_LIBRARY_PATH |
coleenp@1755 | 46 | export LD_LIBRARY_PATH |
coleenp@1755 | 47 | |
coleenp@1755 | 48 | THIS_DIR=`pwd` |
coleenp@1755 | 49 | |
coleenp@1755 | 50 | cp ${TESTSRC}${FS}invoke.c ${THIS_DIR} |
coleenp@1755 | 51 | cp ${TESTSRC}${FS}T.java ${THIS_DIR} |
coleenp@1755 | 52 | |
coleenp@1755 | 53 | |
coleenp@1755 | 54 | ${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -fullversion |
coleenp@1755 | 55 | |
coleenp@1755 | 56 | ${TESTJAVA}${FS}bin${FS}javac T.java |
coleenp@1755 | 57 | |
coleenp@1755 | 58 | gcc -o invoke -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ${TESTJAVA}/jre/lib/i386/client/libjvm.so |
coleenp@1755 | 59 | ./invoke |
coleenp@1755 | 60 | exit $? |