From 1003d10c3278b21de799dcbe6d0280c95afe9a61 Mon Sep 17 00:00:00 2001 From: grev Date: Fri, 31 Oct 2008 18:24:51 +0000 Subject: [PATCH] b=17122 i=Nikita sanity test_100 fix --- lustre/tests/sanity.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 22d1bdc..36b8252 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -3611,10 +3611,17 @@ test_99f() { run_test 99f "cvs commit =======================================" test_100() { - netstat -tna | while read PROT SND RCV LOCAL REMOTE STAT; do - [ "$PROT" != "tcp" ] && continue - RPORT=`echo $REMOTE | cut -d: -f2` + remote_ost_nodsh && skip "remote OST with nodsh" && return + remote_mds_nodsh && skip "remote MDS with nodsh" && return + remote_servers || \ + { skip "useless for local single node setup" && return; } + + netstat -tna | ( rc=1; while read PROT SND RCV LOCAL REMOTE STAT; do + [ "$PROT" != "$NETTYPE" ] && continue + RPORT=$(echo $REMOTE | cut -d: -f2) [ "$RPORT" != "$ACCEPTOR_PORT" ] && continue + + rc=0 LPORT=`echo $LOCAL | cut -d: -f2` if [ $LPORT -ge 1024 ]; then echo "bad: $PROT $SND $RCV $LOCAL $REMOTE $STAT" @@ -3622,7 +3629,7 @@ test_100() { error "local: $LPORT > 1024, remote: $RPORT" fi done - true + [ "$rc" = 0 ] || error "privileged port not found" ) } run_test 100 "check local port using privileged port ===========" -- 1.8.3.1