Whamcloud - gitweb
b=7283
authornic <nic>
Fri, 9 Dec 2005 18:36:13 +0000 (18:36 +0000)
committernic <nic>
Fri, 9 Dec 2005 18:36:13 +0000 (18:36 +0000)
r=adilger

allow tests to handle non-default ACCEPTOR_PORT

lustre/tests/conf-sanity.sh
lustre/tests/echo.sh
lustre/tests/local.sh
lustre/tests/lov.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh
lustre/tests/uml.sh

index 75c20ce..3815714 100644 (file)
@@ -618,7 +618,7 @@ test_15() {
        do_node `hostname` mkdir -p $MOUNT 2> /dev/null
        # load llite module on the client if it isn't in /lib/modules
        do_node `hostname` lconf --nosetup --node client_facet $XMLCONFIG
-       do_node `hostname` mount -t lustre -o nettype=$NETTYPE \
+       do_node `hostname` mount -t lustre -o nettype=$NETTYPE,$MOUNTOPT \
                `facet_active_host mds`:/mds_svc/client_facet $MOUNT ||return $?
        echo "mount lustre on $MOUNT with $MOUNTLUSTRE: success"
        [ -d /r ] && $LCTL modules > /r/tmp/ogdb-`hostname`
@@ -627,7 +627,7 @@ test_15() {
 
        [ -f "$MOUNTLUSTRE" ] && rm -f $MOUNTLUSTRE
        echo "mount lustre on ${MOUNT} without $MOUNTLUSTRE....."
-       do_node `hostname` mount -t lustre -o nettype=$NETTYPE \
+       do_node `hostname` mount -t lustre -o nettype=$NETTYPE,$MOUNTOPT \
                `facet_active_host mds`:/mds_svc/client_facet $MOUNT &&return $?
        echo "mount lustre on $MOUNT without $MOUNTLUSTRE failed as expected"
        cleanup || return $?
index 0c2ab30..10a0bd9 100755 (executable)
@@ -17,6 +17,7 @@ HOSTNAME=`hostname`
 SERVER=${SERVER:-$HOSTNAME}
 CLIENT=${CLIENT:-$HOSTNAME}
 NET=${NET:-tcp}
+[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT"
 
 h2tcp () {
        case $1 in
@@ -60,7 +61,7 @@ STRIPES_PER_OBJ=2     # 0 means stripe over all OSTs
 rm -f $config
 # create nodes
 $LMC --add node --node $SERVER  || exit 1
-$LMC --add net --node $SERVER --nid `h2$NET $SERVER` --nettype $NET || exit 2
+$LMC --add net --node $SERVER --nid `h2$NET $SERVER` --nettype $NET $PORT_OPT|| exit 2
 
 if (($LOV)); then
     $LMC --add mds --node $SERVER --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 10
@@ -75,7 +76,7 @@ fi
 
 if [ "$SERVER" != "$CLIENT" ]; then
    $LMC --add node --node $CLIENT  || exit 1
-   $LMC --add net --node $CLIENT --nid `h2$NET $CLIENT` --nettype $NET || exit 2
+   $LMC --add net --node $CLIENT --nid `h2$NET $CLIENT` --nettype $NET $PORT_OPT || exit 2
 fi
 
 $LMC --add echo_client --node $CLIENT --ost ${OBD_NAME} || exit 3
index ced41d2..0a8cc71 100755 (executable)
@@ -14,6 +14,7 @@ FSTYPE=${FSTYPE:-ext3}
 MOUNT=${MOUNT:-/mnt/lustre}
 MOUNT2=${MOUNT2:-${MOUNT}2}
 NETTYPE=${NETTYPE:-tcp}
+[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT"
 
 OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`}
 OSTSIZE=${OSTSIZE:-400000}
@@ -59,8 +60,9 @@ h2iib () {
 
 # create nodes
 ${LMC} --add node --node $HOSTNAME || exit 10
-${LMC} --add net --node $HOSTNAME --nid `h2$NETTYPE $HOSTNAME` --nettype $NETTYPE || exit 11
-${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12
+${LMC} --add net --node $HOSTNAME --nid `h2$NETTYPE $HOSTNAME` \
+    --nettype $NETTYPE $PORT_OPT || exit 11
+${LMC} --add net --node client --nid '*' --nettype $NETTYPE $PORT_OPT|| exit 12
 
 # configure mds server
 [ "x$MDS_MOUNT_OPTS" != "x" ] &&
index 7130ad0..352c2b9 100755 (executable)
@@ -16,6 +16,7 @@ FSTYPE=${FSTYPE:-ext3}
 MOUNT=${MOUNT:-/mnt/lustre}
 MOUNT2=${MOUNT2:-${MOUNT}2}
 NETTYPE=${NETTYPE:-tcp}
+[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT"
 
 OSTCOUNT=${OSTCOUNT:-5}
 # OSTDEVN will still override the device for OST N
@@ -39,8 +40,9 @@ rm -f $config
 
 # create nodes
 ${LMC} --add node --node $HOSTNAME || exit 10
-${LMC} --add net --node $HOSTNAME --nid $HOSTNAME --nettype $NETTYPE || exit 11
-${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12
+${LMC} --add net --node $HOSTNAME --nid $HOSTNAME \
+    --nettype $NETTYPE $PORT_OPT || exit 11
+${LMC} --add net --node client --nid '*' --nettype $NETTYPE $PORT_OPT || exit 12
 
 [ "x$QUOTA_OPTS" != "x" ] &&
     QUOTA_OPTS="--quota $QUOTA_OPTS"
index 0c58930..fd5a7a9 100644 (file)
@@ -47,6 +47,7 @@ IOPENTEST1=${IOPENTEST1:-iopentest1}
 IOPENTEST2=${IOPENTEST2:-iopentest2}
 MEMHOG=${MEMHOG:-memhog}
 DIRECTIO=${DIRECTIO:-directio}
+ACCEPTOR_PORT=${ACCEPTOR_PORT:-988}
 
 if [ $UID -ne 0 ]; then
     echo "Warning: running as non-root uid $UID"
@@ -2723,7 +2724,7 @@ test_100() {
        netstat -tna | while read PROT SND RCV LOCAL REMOTE STAT; do
                [ "$PROT" != "tcp" ] && continue
                RPORT=`echo $REMOTE | cut -d: -f2`
-               [ "$RPORT" != "988" ] && continue
+               [ "$RPORT" != "$ACCEPTOR_PORT" ] && continue
                LPORT=`echo $LOCAL | cut -d: -f2`
                [ $LPORT -ge 1024 ] && error "local port: $LPORT > 1024" || true
        done
index 1055789..0a4f437 100644 (file)
@@ -42,6 +42,15 @@ init_test_env() {
     export CHECKSTAT="${CHECKSTAT:-checkstat} "
     export FSYTPE=${FSTYPE:-"ext3"}
 
+    if [ "$ACCEPTOR_PORT" ]; then
+        if [ -z "$MOUNTOPT" ]; then
+            export MOUNTOPT="port=$ACCEPTOR_PORT"
+        else
+            export MOUNTOPT="$MOUNTOPT,port=$ACCEPTOR_PORT"
+        fi
+        export PORT_OPT="--port $ACCEPTOR_PORT"
+    fi
+
     # Paths on remote nodes, if different 
     export RLUSTRE=${RLUSTRE:-$LUSTRE}
     export RPWD=${RPWD:-$PWD}
@@ -343,7 +352,8 @@ add_facet() {
     echo "add facet $facet: `facet_host $facet`"
     do_lmc --add node --node ${facet}_facet $@ --timeout $TIMEOUT \
         --lustre_upcall $UPCALL --ptldebug $PTLDEBUG --subsystem $SUBSYSTEM
-    do_lmc --add net --node ${facet}_facet --nid `facet_nid $facet` --nettype lnet
+    do_lmc --add net --node ${facet}_facet --nid `facet_nid $facet` \
+        --nettype lnet $PORT_OPT
 }
 
 add_mds() {
index 9c8955d..e887a9f 100644 (file)
@@ -27,6 +27,7 @@ CLIENTOPT="user_xattr,acl,${CLIENTOPT:-""}"
 
 NETTYPE=${NETTYPE:-tcp}
 NIDTYPE=${NIDTYPE:-$NETTYPE}
+[ "$ACCEPTOR_PORT" ] && PORT_OPT="--port $ACCEPTOR_PORT"
 
 # NOTE - You can't have different MDS/OST nodes and also have clients on the
 #        MDS/OST nodes without using --endlevel and --startlevel during lconf.
@@ -87,7 +88,8 @@ h2iib () {
 echo -n "adding NET for:"
 for NODE in `echo $MDSNODE $OSTNODES $CLIENTS | tr -s " " "\n" | sort -u`; do
        echo -n " $NODE"
-       ${LMC} -m $config --add net --node $NODE --nid `h2$NIDTYPE $NODE` --nettype $NETTYPE || exit 1
+       ${LMC} -m $config --add net --node $NODE --nid `h2$NIDTYPE $NODE` \
+    --nettype $NETTYPE $PORT_OPT || exit 1
 done
 
 # configure mds server