X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flnet-selftest.sh;h=386d3d2029a9484a032cc904c76c5aa661537f18;hb=9d72ec94b56590ad5da7003e93dd268d81fc8d14;hp=da254bdd6d9e92464f630a02a668eec319ec6c42;hpb=d031e92fe730792e3a4dba2f1e8ae90a085c96c5;p=fs%2Flustre-release.git diff --git a/lustre/tests/lnet-selftest.sh b/lustre/tests/lnet-selftest.sh index da254bd..386d3d2 100755 --- a/lustre/tests/lnet-selftest.sh +++ b/lustre/tests/lnet-selftest.sh @@ -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 @@ -99,7 +108,7 @@ test_smoke_sub () { echo $LST run b echo sleep 1 - echo "$LST stat --delay 10 c s &" + echo "$LST stat --delay 10 --timeout 10 c s &" echo 'pid=$!' echo 'trap "cleanup $pid" INT TERM' echo sleep $smoke_DURATION @@ -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