From eb5fed6ce1916cfe17dd30f47ecf5b15a552de2b Mon Sep 17 00:00:00 2001 From: grev <grev> Date: Tue, 19 Feb 2008 16:25:02 +0000 Subject: [PATCH] b=14842 i=Adilger more fixes to reduce acc-sm time; SLOW=no is default now. --- lustre/tests/cfg/insanity-local.sh | 1 + 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 | 29 ++++++++++++++++++----------- lustre/tests/sanity.sh | 24 ++++++++++++++++++++---- lustre/tests/sanityN.sh | 4 ++-- 9 files changed, 52 insertions(+), 27 deletions(-) diff --git a/lustre/tests/cfg/insanity-local.sh b/lustre/tests/cfg/insanity-local.sh index 5d0af6b945..8aeb1b785a 100644 --- a/lustre/tests/cfg/insanity-local.sh +++ b/lustre/tests/cfg/insanity-local.sh @@ -66,3 +66,4 @@ MOUNT=${MOUNT:-"/mnt/lustre"} 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/cfg/local.sh b/lustre/tests/cfg/local.sh index c40176fdc2..5a94a568fc 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -87,3 +87,4 @@ fi 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 bba9a16df0..d8f186257c 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -19,9 +19,6 @@ MOUNTCONFSKIP="10 11 12 13 13b 14 15 " ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP 34a 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 @@ -37,6 +34,9 @@ MDSSIZE=40000 OSTSIZE=40000 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.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 3b11f4af7e..1df7d3888a 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -5,16 +5,16 @@ set -e # bug 5493 ALWAYS_EXCEPT="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 65ff49c747..53c438c624 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -5,9 +5,6 @@ set -e # bug number: 10124 ALWAYS_EXCEPT="15c $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 65e05895b7..8080e311d0 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 0fe1d48a3a..d410638055 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};; @@ -48,6 +47,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,7 @@ SHOW_QUOTA_INFO="$LFS quota -t $DIR" # control the time of tests cycle=30 +[ "$SLOW" = "no" ] && cycle=10 build_test_filter @@ -711,8 +713,11 @@ 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; @@ -867,9 +872,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 @@ -883,12 +890,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 @@ -898,11 +905,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 @@ -910,7 +917,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 9bcdb7d3b1..7b7f9dc333 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11,8 +11,6 @@ ONLY=${ONLY:-"$*"} ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27o 27q 42a 42b 42c 42d 45 51d 74b 75 $SANITY_EXCEPT" } # 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, maybe elsewhere, FIXME CPU=`awk '/model/ {print $4}' /proc/cpuinfo` # buffer i/o errs sock spc runas @@ -70,6 +68,8 @@ LUSTRE=${LUSTRE:-`dirname $0`/..} init_test_env $@ . ${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" + SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log} FAIL_ON_ERROR=false @@ -3164,7 +3164,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 @@ -4092,6 +4094,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 @@ -4426,6 +4440,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)) @@ -4694,7 +4710,7 @@ test_123() # statahead(bug 11401) [ $delta -gt 20 ] && break [ $delta -gt 8 ] && MULT=$((50 / delta)) - [ "$SLOW" = "no" -a $delta -gt 3 ] && break + [ "$SLOW" = "no" -a $delta -ge 3 ] && break done log "ls done" diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 3dba623fd8..e8ec06c11a 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -10,8 +10,6 @@ ALWAYS_EXCEPT=" 14b 14c $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" @@ -44,6 +42,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 -- GitLab