From c7b8bd84cd1e762733edd23dede59c4c17ad44b3 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 20 Feb 2008 21:31:59 +0000 Subject: [PATCH] b=14842 i=Adilger more fixes to reduce acc-sm time; set SLOW=no default --- lustre/tests/acceptance-small.sh | 7 ++----- lustre/tests/cfg/insanity-local.sh | 2 ++ lustre/tests/cfg/local.sh | 1 + lustre/tests/conf-sanity.sh | 6 +++--- lustre/tests/recovery-small.sh | 8 ++++---- lustre/tests/replay-dual.sh | 5 ++--- lustre/tests/runtests | 1 + lustre/tests/sanity-quota.sh | 39 ++++++++++++++++++++++++++------------ lustre/tests/sanity.sh | 26 +++++++++++++++++++++---- lustre/tests/sanityN.sh | 4 ++-- 10 files changed, 66 insertions(+), 33 deletions(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 2494bd5..6ebcf51 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -27,11 +27,6 @@ fi export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA SANITY_SEC" -if [ "$SLOW" = "no" ]; then -# 5 min - export IOZONE="no" -fi - if [ "$ACC_SM_ONLY" ]; then for O in $TESTSUITE_LIST; do export ${O}="no" @@ -154,6 +149,8 @@ for NAME in $CONFIGS; do fi export O_DIRECT + [ "$SLOW" = "no" ] && export IOZONE=no # 5 minutes + which iozone > /dev/null 2>&1 || IOZONE=no if [ "$IOZONE" != "no" ]; then title iozone diff --git a/lustre/tests/cfg/insanity-local.sh b/lustre/tests/cfg/insanity-local.sh index b692628..1a9f5dd 100644 --- a/lustre/tests/cfg/insanity-local.sh +++ b/lustre/tests/cfg/insanity-local.sh @@ -75,3 +75,5 @@ POWER_DOWN=${POWER_DOWN:-"powerman --off"} POWER_UP=${POWER_UP:-"powerman --on"} PDSH=${PDSH:-no_dsh} +SLOW=${SLOW:-no} + diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index 485815b..393e5ce 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -97,3 +97,4 @@ PDSH=${PDSH:-no_dsh} FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD POWER_DOWN=${POWER_DOWN:-"powerman --off"} POWER_UP=${POWER_UP:-"powerman --on"} +SLOW=${SLOW:-no} diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index dd18818..21f4007 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -20,9 +20,6 @@ HEAD_EXCEPT=" 32a 32b " ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP $HEAD_EXCEPT 23 36" # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -# -[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a " - SRCDIR=`dirname $0` PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH @@ -41,6 +38,9 @@ MDSSIZE=40000 OSTSIZE=40000 . ${CONFIG:=$LUSTRE/tests/cfg/local.sh} +# +[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a " + reformat() { formatall } diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 1489421..c6d1eea 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -5,16 +5,16 @@ set -e # bug 5494 7288 5493 ALWAYS_EXCEPT="24 27 52 $RECOVERY_SMALL_EXCEPT" -# also long tests: 19, 21a, 21e, 21f, 23, 27 -# 1 2.5 4 4 (min)" -[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26b 50 51 57" - PTLDEBUG=${PTLDEBUG:--1} LUSTRE=${LUSTRE:-`dirname $0`/..} . $LUSTRE/tests/test-framework.sh 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" + build_test_filter # Allow us to override the setup if we already have a mounted system by diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index a367d95..2a504fa 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -5,9 +5,6 @@ set -e # bug number: 6088 10124 10800 ALWAYS_EXCEPT="8 15c 17 $REPLAY_DUAL_EXCEPT" -# -[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 5 14" - SAVE_PWD=$PWD PTLDEBUG=${PTLDEBUG:--1} LUSTRE=${LUSTRE:-`dirname $0`/..} @@ -20,6 +17,8 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +# +[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 5 14" build_test_filter diff --git a/lustre/tests/runtests b/lustre/tests/runtests index 65e05895..8080e31 100755 --- a/lustre/tests/runtests +++ b/lustre/tests/runtests @@ -27,6 +27,7 @@ fail() { ERROR= RUNTESTS_SRC=${RUNTESTS_SRC:-"/etc /bin"} [ "$COUNT" ] || COUNT=1000 +[ "$SLOW" = "no" ] && COUNT=100 [ "$MCREATE" ] || MCREATE=mcreate diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index cc3671e..8aa4c66 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -19,7 +19,6 @@ export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin ONLY=${ONLY:-"$*"} ALWAYS_EXCEPT="$SANITY_QUOTA_EXCEPT" # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 10 11" case `uname -r` in 2.6*) FSTYPE=${FSTYPE:-ldiskfs};; @@ -50,6 +49,8 @@ LUSTRE=${LUSTRE:-`dirname $0`/..} init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 10 11" + QUOTALOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log} [ "$QUOTALOG" ] && rm -f $QUOTALOG || true @@ -66,6 +67,10 @@ SHOW_QUOTA_USER="$LFS quota -u $TSTUSR $DIR" SHOW_QUOTA_GROUP="$LFS quota -g $TSTUSR $DIR" SHOW_QUOTA_INFO="$LFS quota -t $DIR" +# control the time of tests +cycle=30 +[ "$SLOW" = "no" ] && cycle=10 + build_test_filter eval ONLY_0=true @@ -606,12 +611,13 @@ test_8() { DBENCH_LIB=${DBENCH_LIB:-/usr/lib/dbench} [ ! -d $DBENCH_LIB ] && skip "dbench not installed" && return 0 + + wait_delete_completed echo " Set enough high limit for user: $TSTUSR" $LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR echo " Set enough high limit for group: $TSTUSR" $LFS setquota -g $USER 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR - TGT=$DIR/$tdir/client.txt SRC=${SRC:-$DBENCH_LIB/client.txt} @@ -622,10 +628,15 @@ test_8() { chmod 0777 $DIR/$tdir SAVE_PWD=$PWD cd $DIR/$tdir - $RUNAS dbench -c client.txt 3 + local duration="" + [ "$SLOW" = "no" ] && duration=" -t 120" + $RUNAS dbench -c client.txt 3 $duration RC=$? + [ $RC -ne 0 ] && killall -9 dbench rm -f client.txt + sync; sleep 3; sync; + cd $SAVE_PWD return $RC } @@ -784,6 +795,8 @@ test_10() { run_test 10 "run for fixing bug10707(32bit) ===========" test_11() { + wait_delete_completed + #prepare the test block_limit=`(echo 0; df -t lustre -P | awk '{print $(NF - 4)}') | tail -n 1` echo $block_limit @@ -799,9 +812,11 @@ test_11() { local RV=0 #do the test - MINS=0 - REPS=3 - i=1 + local SECS=0 + local REPS=3 + [ "$SLOW" = no ] && REPS=1 + local sleep=20 + local i=1 while [ $i -le $REPS ]; do echo "test: cycle($i of $REPS) start at $(date)" mkdir -p $DIR/$tdir && chmod 777 $DIR/$tdir @@ -815,12 +830,12 @@ test_11() { PROCS=$(ps -ef | grep -v grep | grep "dd if /dev/zero of $TESTDIR" | wc -l) LAST_USED=0 while [ $PROCS -gt 0 ]; do - sleep 60 - MINS=$(($MINS+1)) + sleep 20 + SECS=$((SECS + sleep)) PROCS=$(ps -ef | grep -v grep | grep "dd if /dev/zero of $TESTDIR" | wc -l) USED=$(du -s $DIR/$tdir | awk '{print $1}') PCT=$(($USED * 100 / $block_limit)) - echo "${i}/${REPS} ${PCT}% p${PROCS} t${MINS} " + echo "${i}/${REPS} ${PCT}% p${PROCS} t${SECS} " if [ $USED -le $LAST_USED ]; then kill -9 $(ps -ef | grep "dd if /dev/zero of $DIR/$tdir" | grep -v grep | awk '{ print $2 }') i=$REPS @@ -830,11 +845,11 @@ test_11() { LAST_USED=$USED done echo " removing the test files..." - rm -rf $DIR/$tdir/$tfile-0 + rm -f $DIR/$tdir/$tfile echo "cycle $i done at $(date)" i=$[$i+1] done - echo "Test took $MINS minutes" + echo "Test took $SECS sec" #clean echo $orig_dbr > /proc/sys/vm/dirty_background_ratio @@ -842,7 +857,7 @@ test_11() { echo $orig_dr > /proc/sys/vm/dirty_ratio echo $orig_dwc > /proc/sys/vm/dirty_writeback_centisecs if [ $RV -ne 0 ]; then - error "Nothing was written for over a minute... aborting" + error "Nothing was written for $SECS sec ... aborting" fi return $RV } diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 57bbc17..f700fed 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -13,8 +13,6 @@ ALWAYS_EXCEPT=" 27o 27q 42a 42b 42c 42d 45 74b 75 $SANI #ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"} # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b" - # Tests that fail on uml CPU=`awk '/model/ {print $4}' /proc/cpuinfo` # buffer i/o errs sock spc runas @@ -73,13 +71,17 @@ TRACE=${TRACE:-""} LUSTRE=${LUSTRE:-`dirname $0`/..} . $LUSTRE/tests/test-framework.sh init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/local.sh} +. ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh} + +[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b" if $GSS_KRB5; then $RUNAS krb5_login.sh || exit 1 $RUNAS -u $(($RUNAS_ID + 1)) krb5_login.sh || exit 1 fi +[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b" + SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log} FAIL_ON_ERROR=false @@ -3245,7 +3247,9 @@ test_76() { # bug 1443 [ $DETH -eq 0 ] && skip "No _iget." && return 0 BEFORE_INODES=`num_inodes` echo "before inodes: $BEFORE_INODES" - for i in `seq 1000`; do + local COUNT=1000 + [ "$SLOW" = "no" ] && COUNT=100 + for i in `seq $COUNT`; do touch $DIR/$tfile rm -f $DIR/$tfile done @@ -4141,6 +4145,18 @@ test_117() # bug 10891 } run_test 117 "verify fsfilt_extend ==========" +export OLD_RESENDCOUNT="" +set_resend_count () { + local PROC_RESENDCOUNT="$LPROC/osc/${FSNAME}-OST*-osc-*/resend_count" + OLD_RESENDCOUNT=$(cat $PROC_RESENDCOUNT | head -1) + for i in $PROC_RESENDCOUNT; do + echo $1 >$i + done + echo resend_count is set to $(cat $PROC_RESENDCOUNT) +} + +[ "$SLOW" = "no" ] && set_resend_count 4 # for reduce test_118* time (bug 14842) + # Reset async IO behavior after error case reset_async() { FILE=$DIR/reset_async @@ -4475,6 +4491,8 @@ test_118k() } run_test 118k "bio alloc -ENOMEM and IO TERM handling =========" +[ "$SLOW" = "no" ] && [ -n "$OLD_RESENDCOUNT" ] && set_resend_count $OLD_RESENDCOUNT + test_119a() # bug 11737 { BSIZE=$((512 * 1024)) diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 399dff8..bc54fd2 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -10,8 +10,6 @@ ALWAYS_EXCEPT="14b 28 $SANITYN_EXCEPT" # bug number for skipped test: 12652 12652 grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11 14" || true -[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16" - # Tests that fail on uml [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7" @@ -48,6 +46,8 @@ SETUP=${SETUP:-:} init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16" + SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log} FAIL_ON_ERROR=false -- 1.8.3.1