Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/sun/net/sdp/sanity.sh
38839 views
#1# Copyright (c) 2009, 2012, 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 489070325# @summary Unit test for Solaris SDP support26# @build ProbeIB Sanity27# @run shell sanity.sh2829# Check we are on Solaris and that SDP is enabled30OS=`uname -s`31if [ "$OS" != "SunOS" ]; then32echo "This is a Solaris-only test"33exit 034fi3536IB_LINKS=ib.links37IB_ADDRS=ib.addrs3839# Display IB partition link information40# (requires Solaris 11, will fail on Solaris 10)41/usr/sbin/dladm show-part -o LINK -p > ${IB_LINKS}42if [ $? != 0 ]; then43echo "Unable to get IB parition link information"44exit 045fi4647if [ -z "$TESTJAVA" ]; then48JAVA=java49TESTCLASSES=.50TESTSRC=.51else52JAVA="${TESTJAVA}/bin/java"53fi5455CLASSPATH=${TESTCLASSES}:${TESTSRC}56export CLASSPATH5758# Probe for IP addresses plumbed to IB interfaces59$JAVA ${TESTVMOPTS} -Djava.net.preferIPv4Stack=true ProbeIB ${IB_LINKS} > ${IB_ADDRS}6061# Create sdp.conf62SDPCONF=sdp.conf63rm ${SDPCONF}64touch ${SDPCONF}65cat ${IB_ADDRS} | while read ADDR66do67echo "bind ${ADDR} *" > ${SDPCONF}68echo "connect ${ADDR} *" >> ${SDPCONF}69done7071# Sanity check72$JAVA ${TESTVMOPTS} -Djava.net.preferIPv4Stack=true -Dcom.sun.sdp.conf=${SDPCONF} -Dcom.sun.sdp.debug Sanity737475