Path: blob/master/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh
41152 views
#1# Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#2223# @test24# @bug 467344225# @summary remove doPrivileged when creatingting the NotifyHandshakeThread26# @run shell NotifyHandshakeTest.sh27# @author Brad Wetmore28#29# To run independently: sh NotifyHandshakeTest.sh3031if [ "${TESTJAVA}" = "" ]32then33echo "TESTJAVA not set. Test cannot execute. Failed."34exit 135fi3637if [ "${COMPILEJAVA}" = "" ]; then38COMPILEJAVA="${TESTJAVA}"39fi4041if [ "${TESTSRC}" = "" ]42then43TESTSRC="."44fi4546OS=`uname -s`47case "$OS" in48Linux | Darwin | AIX )49FILESEP="/"50PATHSEP=":"51;;5253CYGWIN* )54FILESEP="/"55PATHSEP=";"56;;5758Windows* )59FILESEP="\\"60PATHSEP=";"61;;62esac6364set -ex6566#67# Compile the tests, package into their respective jars68#69${COMPILEJAVA}${FILESEP}bin${FILESEP}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \70${TESTSRC}${FILESEP}NotifyHandshakeTest.java \71${TESTSRC}${FILESEP}NotifyHandshakeTestHeyYou.java72${COMPILEJAVA}${FILESEP}bin${FILESEP}jar ${TESTTOOLVMOPTS} -cvf com.jar \73com${FILESEP}NotifyHandshakeTest*.class74${COMPILEJAVA}${FILESEP}bin${FILESEP}jar ${TESTTOOLVMOPTS} -cvf edu.jar \75edu${FILESEP}NotifyHandshakeTestHeyYou.class7677#78# Don't want the original class files to be used, because79# we want the jar files with the associated contexts to80# be used.81#82rm -rf com edu8384#85# This is the only thing we really care about as far as86# test status goes.87#88${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \89-Dtest.src=${TESTSRC} \90-classpath "com.jar${PATHSEP}edu.jar" \91-Djava.security.manager \92-Djava.security.policy=${TESTSRC}${FILESEP}NotifyHandshakeTest.policy \93com.NotifyHandshakeTest94retval=$?9596rm com.jar edu.jar9798exit $retval99100101