18 # 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 # or visit www.oracle.com if you need additional information or have any 21 # questions. 22 # 23 24 # @test 25 # @bug 4673442 26 # @summary remove doPrivileged when creatingting the NotifyHandshakeThread 27 # @run shell NotifyHandshakeTest.sh 28 # @author Brad Wetmore 29 # 30 # To run independently: sh NotifyHandshakeTest.sh 31 32 if [ "${TESTJAVA}" = "" ] 33 then 34 echo "TESTJAVA not set. Test cannot execute. Failed." 35 exit 1 36 fi 37 38 if [ "${TESTSRC}" = "" ] 39 then 40 TESTSRC="." 41 fi 42 43 OS=`uname -s` 44 case "$OS" in 45 SunOS | Linux | Darwin ) 46 FILESEP="/" 47 PATHSEP=":" 48 ;; 49 50 CYGWIN* ) 51 FILESEP="/" 52 PATHSEP=";" 53 ;; 54 55 Windows* ) 56 FILESEP="\\" 57 PATHSEP=";" 58 ;; 59 esac 60 61 set -ex 62 63 # 64 # Compile the tests, package into their respective jars 65 # 66 ${TESTJAVA}${FILESEP}bin${FILESEP}javac -d . \ 67 ${TESTSRC}${FILESEP}NotifyHandshakeTest.java \ 68 ${TESTSRC}${FILESEP}NotifyHandshakeTestHeyYou.java 69 ${TESTJAVA}${FILESEP}bin${FILESEP}jar -cvf com.jar \ 70 com${FILESEP}NotifyHandshakeTest*.class 71 ${TESTJAVA}${FILESEP}bin${FILESEP}jar -cvf edu.jar \ 72 edu${FILESEP}NotifyHandshakeTestHeyYou.class 73 74 # 75 # Don't want the original class files to be used, because 76 # we want the jar files with the associated contexts to 77 # be used. 78 # 79 rm -rf com edu 80 81 # 82 # This is the only thing we really care about as far as 83 # test status goes. 84 # 85 ${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \ 86 -Dtest.src=${TESTSRC} \ 87 -classpath "com.jar${PATHSEP}edu.jar" \ 88 -Djava.security.manager \ 89 -Djava.security.policy=${TESTSRC}${FILESEP}NotifyHandshakeTest.policy \ 90 com.NotifyHandshakeTest 91 retval=$? | 18 # 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 # or visit www.oracle.com if you need additional information or have any 21 # questions. 22 # 23 24 # @test 25 # @bug 4673442 26 # @summary remove doPrivileged when creatingting the NotifyHandshakeThread 27 # @run shell NotifyHandshakeTest.sh 28 # @author Brad Wetmore 29 # 30 # To run independently: sh NotifyHandshakeTest.sh 31 32 if [ "${TESTJAVA}" = "" ] 33 then 34 echo "TESTJAVA not set. Test cannot execute. Failed." 35 exit 1 36 fi 37 38 if [ "${COMPILEJAVA}" = "" ]; then 39 COMPILEJAVA="${TESTJAVA}" 40 fi 41 42 if [ "${TESTSRC}" = "" ] 43 then 44 TESTSRC="." 45 fi 46 47 OS=`uname -s` 48 case "$OS" in 49 SunOS | Linux | Darwin ) 50 FILESEP="/" 51 PATHSEP=":" 52 ;; 53 54 CYGWIN* ) 55 FILESEP="/" 56 PATHSEP=";" 57 ;; 58 59 Windows* ) 60 FILESEP="\\" 61 PATHSEP=";" 62 ;; 63 esac 64 65 set -ex 66 67 # 68 # Compile the tests, package into their respective jars 69 # 70 ${COMPILEJAVA}${FILESEP}bin${FILESEP}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \ 71 ${TESTSRC}${FILESEP}NotifyHandshakeTest.java \ 72 ${TESTSRC}${FILESEP}NotifyHandshakeTestHeyYou.java 73 ${COMPILEJAVA}${FILESEP}bin${FILESEP}jar ${TESTTOOLVMOPTS} -cvf com.jar \ 74 com${FILESEP}NotifyHandshakeTest*.class 75 ${COMPILEJAVA}${FILESEP}bin${FILESEP}jar ${TESTTOOLVMOPTS} -cvf edu.jar \ 76 edu${FILESEP}NotifyHandshakeTestHeyYou.class 77 78 # 79 # Don't want the original class files to be used, because 80 # we want the jar files with the associated contexts to 81 # be used. 82 # 83 rm -rf com edu 84 85 # 86 # This is the only thing we really care about as far as 87 # test status goes. 88 # 89 ${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \ 90 -Dtest.src=${TESTSRC} \ 91 -classpath "com.jar${PATHSEP}edu.jar" \ 92 -Djava.security.manager \ 93 -Djava.security.policy=${TESTSRC}${FILESEP}NotifyHandshakeTest.policy \ 94 com.NotifyHandshakeTest 95 retval=$? |