Whamcloud - gitweb
LU-5162 mdc: Add exception entry check for radix_tree
[fs/lustre-release.git] / lustre / tests / lnet-selftest.sh
index 974981d..386d3d2 100755 (executable)
@@ -1,14 +1,22 @@
-#!/bin/sh
+#!/bin/bash
+# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
+# vim:shiftwidth=4:softtabstop=4:tabstop=4:
 
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+init_logging
 
 #
 ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
 
-[ x$LST = x ] &&  { skip_env "$0 : lst not found LST=$LST" && exit 0; }
+if [[ $MDSCOUNT -ge 2 ]]; then
+       #LU-4181
+       skip "Only run with single MDT for now" && exit
+fi
+
+[ x$LST = x ] && { skip_env "lst not found LST=$LST" && exit 0; }
 
 # FIXME: what is the reasonable value here?
 lst_LOOP=${lst_LOOP:-100000}
@@ -25,8 +33,9 @@ if [ "$SLOW" = no ]; then
     [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
 fi
 
-lst_SERVERS=${lst_SERVERS:-$(comma_list $(osts_nodes) $(mdts_nodes))}
-lst_CLIENTS=${lst_CLIENTS:-${CLIENTS:-`hostname`}}
+nodes=$(comma_list "$(osts_nodes) $(mdts_nodes)")
+lst_SERVERS=${lst_SERVERS:-$(comma_list "$(host_nids_address $nodes $NETTYPE)")}
+lst_CLIENTS=${lst_CLIENTS:-$(comma_list "$(host_nids_address $CLIENTS $NETTYPE)")}
 
 is_mounted () {
     local mntpt=$1
@@ -149,13 +158,12 @@ test_smoke () {
 
     # error counters in "lst show_error" should be checked
     check_lst_err $log
-    
+    lst_cleanup_all    
 }
 run_test smoke "lst regression test"
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $SECONDS
 if [ "$RESTORE_MOUNT" = yes ]; then
     setupall
 fi 
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
-
+exit_status