From f2149b73da759ed25a333ab97c9acc0366d5b8b4 Mon Sep 17 00:00:00 2001 From: grev Date: Fri, 14 Mar 2008 11:51:47 +0000 Subject: [PATCH] b=15221 i=Adilger sanity test_71, recovery-small test_26 fixes renumbering test_26->test_26a FAIL_ON_ERROR initialization in cfg error, remote_mds, remote_ost fn fixes (b=14763 comment 19) --- lustre/tests/cfg/insanity-local.sh | 1 + lustre/tests/cfg/local.sh | 1 + lustre/tests/recovery-small.sh | 13 +++++++------ lustre/tests/sanity.sh | 2 +- lustre/tests/test-framework.sh | 8 ++++---- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lustre/tests/cfg/insanity-local.sh b/lustre/tests/cfg/insanity-local.sh index 8b76b59..0708126 100644 --- a/lustre/tests/cfg/insanity-local.sh +++ b/lustre/tests/cfg/insanity-local.sh @@ -67,3 +67,4 @@ FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD POWER_DOWN=${POWER_DOWN:-"powerman --off"} POWER_UP=${POWER_UP:-"powerman --on"} SLOW=${SLOW:-no} +FAIL_ON_ERROR=${FAIL_ON_ERROR:-true} diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index 6357a34..00d5796 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -88,3 +88,4 @@ FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD POWER_DOWN=${POWER_DOWN:-"powerman --off"} POWER_UP=${POWER_UP:-"powerman --on"} SLOW=${SLOW:-no} +FAIL_ON_ERROR=${FAIL_ON_ERROR:-true} diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index ed82fda..d9a1660 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -12,8 +12,8 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} # also long tests: 19, 21a, 21e, 21f, 23, 27 -# 1 2.5 4 4 (min)" -[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26b 50 51 57" +# 1 2.5 2.5 4 4 (min)" +[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26a 26b 50 51 57" build_test_filter @@ -602,10 +602,11 @@ test_24() { # bug 2248 - eviction fails writeback but app doesn't see it } run_test 24 "fsync error (should return error)" -test_26() { # bug 5921 - evict dead exports by pinger +test_26a() { # was test_26 bug 5921 - evict dead exports by pinger +mount | grep "type lustre" # this test can only run from a client on a separate node. - remote_ost || skip "local OST" && return - remote_mds || skip "local MDS" && return + remote_ost || { skip "local OST" && return 0; } + remote_mds || { skip "local MDS" && return 0; } OST_FILE=obdfilter.${ost1_svc}.num_exports OST_EXP="`do_facet ost1 lctl get_param -n $OST_FILE`" OST_NEXP1=`echo $OST_EXP | cut -d' ' -f2` @@ -624,7 +625,7 @@ test_26() { # bug 5921 - evict dead exports by pinger [ $OST_NEXP1 -le $OST_NEXP2 ] && error "client not evicted" return 0 } -run_test 26 "evict dead exports" +run_test 26a "evict dead exports" test_26b() { # bug 10140 - evict dead exports by pinger client_df diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6234dbb..7517d15 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2932,7 +2932,7 @@ test_69() { run_test 69 "verify oa2dentry return -ENOENT doesn't LBUG ======" test_71() { - which dbench > /dev/null 2>&1 || skip "dbench not installed, skip this test" && return 0 + which dbench > /dev/null 2>&1 || { skip "dbench not installed, skip this test" && return 0; } DBENCH_LIB=${DBENCH_LIB:-/usr/lib/dbench} PATH=${DBENCH_LIB}:${PATH} cp `which dbench` $DIR diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 9a43122..54807b4 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -220,7 +220,7 @@ unload_modules() { local MODULES=$($LCTL modules | awk '{ print $2 }' | grep -v libcfs) $RMMOD $MODULES > /dev/null 2>&1 || true # do it again, in case we tried to unload ksocklnd too early - MODULES=$($LCTL modules | awk '{ print $2 }' | grep -v libcfs) + MODULES=$($LCTL modules | awk '{ print $2 }' | grep -v libcfs) || true [ -n "$MODULES" ] && $RMMOD $MODULES > /dev/null 2>&1 || true lsmod | grep libcfs > /dev/null && $LCTL dk $TMP/debug $RMMOD libcfs @@ -1042,7 +1042,7 @@ error_noexit() { error() { error_noexit "$@" - [ "$FAIL_ON_ERROR" ] && exit 1 || true + $FAIL_ON_ERROR && exit 1 || true } error_exit() { @@ -1286,7 +1286,7 @@ osc_to_ost() remote_mds () { - [ -z "$(lctl dl | grep \)" ] + [ -z "$(lctl dl | grep mdt)" ] } remote_mds_nodsh() @@ -1296,7 +1296,7 @@ remote_mds_nodsh() remote_ost () { - [ -z "$(lctl dl | grep \)" ] + [ -z "$(lctl dl | grep ost)" ] } remote_ost_nodsh() -- 1.8.3.1