Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/com/oracle/net/sanity.sh
38839 views
#1# Copyright (c) 2010, 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 696507225# @summary Unit test for SDP support26# @build Sanity27# @run shell sanity.sh2829IB_LINKS=ib.links3031OS=`uname -s`32case "$OS" in33SunOS )34/usr/sbin/dladm show-part -o LINK -p > ${IB_LINKS}35if [ $? != 0 ]; then36echo "Unable to get InfiniBand parition link information"37exit 038fi39;;40Linux )41if [ ! -f /proc/net/sdp ]; then42echo "InfiniBand SDP module not installed"43exit 044fi45egrep "^[ \t]+ib" /proc/net/dev|cut -d':' -f1|tr -d '\t ' > ${IB_LINKS}46;;47* )48echo "This test only runs on Solaris or Linux"49exit 050;;51esac5253if [ -z "$TESTJAVA" ]; then54JAVA=java55TESTCLASSES=.56TESTSRC=.57else58JAVA="${TESTJAVA}/bin/java"59fi6061CLASSPATH=${TESTCLASSES}:${TESTSRC}62export CLASSPATH6364# Run sanity test (IPv4-only for now)65$JAVA ${TESTVMOPTS} -Djava.net.preferIPv4Stack=true Sanity ${IB_LINKS}666768