Whamcloud - gitweb
b=23051 improve summary of acc-sm to include test times
authorElena Gryaznova <elena.gryaznova@oracle.com>
Wed, 22 Dec 2010 22:43:49 +0000 (01:43 +0300)
committerAndrew Perepechko <andrew.perepechko@oracle.com>
Wed, 22 Dec 2010 22:46:09 +0000 (01:46 +0300)
i=Andrew.Perepechko

acceptance-small test suites name cleanup:
- rename sanityN -> sanityn, lfscktest -> lfsck
- add racer.sh, liblustre.sh scripts
- remove fsx,bonnie,dbench,iozone.lfsck parts

lustre/tests/Makefile.am
lustre/tests/acceptance-small.sh
lustre/tests/lfsck.sh [moved from lustre/tests/lfscktest.sh with 100% similarity, mode: 0644]
lustre/tests/liblustre.sh [new file with mode: 0644]
lustre/tests/racer.sh [new file with mode: 0644]
lustre/tests/sanity-benchmark.sh
lustre/tests/sanityn.sh [moved from lustre/tests/sanityN.sh with 100% similarity]
lustre/tests/test-framework.sh

index d667577..7903112 100644 (file)
@@ -10,14 +10,14 @@ noinst_DATA = disk1_6.tar.bz2
 noinst_SCRIPTS = leak_finder.pl llmount.sh llmountcleanup.sh functions.sh
 noinst_SCRIPTS += test-framework.sh runvmstat runiozone runtests
 noinst_SCRIPTS += sanity.sh rundbench acceptance-small.sh compile.sh
-noinst_SCRIPTS += conf-sanity.sh insanity.sh lfscktest.sh oos.sh oos2.sh
+noinst_SCRIPTS += conf-sanity.sh insanity.sh lfsck.sh oos.sh oos2.sh
 noinst_SCRIPTS += llog-test.sh recovery-small.sh replay-dual.sh sanity-quota.sh
-noinst_SCRIPTS += replay-ost-single.sh replay-single.sh run-llog.sh sanityN.sh
-noinst_SCRIPTS += large-scale.sh runracer performance-sanity.sh
+noinst_SCRIPTS += replay-ost-single.sh replay-single.sh run-llog.sh sanityn.sh
+noinst_SCRIPTS += large-scale.sh runracer racer.sh performance-sanity.sh
 noinst_SCRIPTS += mdsrate-create-small.sh mdsrate-create-large.sh
 noinst_SCRIPTS += mdsrate-lookup-1dir.sh mdsrate-lookup-10dirs.sh
 noinst_SCRIPTS += mdsrate-stat-small.sh mdsrate-stat-large.sh replay-vbr.sh
-noinst_SCRIPTS += sanity-benchmark.sh
+noinst_SCRIPTS += sanity-benchmark.sh liblustre.sh
 noinst_SCRIPTS += lockorder.sh socketclient socketserver runmultiop_bg_pause
 noinst_SCRIPTS += recovery-mds-scale.sh run_dd.sh run_tar.sh run_iozone.sh
 noinst_SCRIPTS += run_dbench.sh run_IOR.sh recovery-double-scale.sh
index addbb4b..524cb9b 100755 (executable)
@@ -4,25 +4,6 @@
 #set -vx
 set -e
 
-[ -z "$CONFIG" -a "$NAME" ] && CONFIGS=$NAME
-[ "$CONFIGS" ] || CONFIGS="local"  #"local lov"
-[ "$MAX_THREADS" ] || MAX_THREADS=20
-RAMKB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
-if [ -z "$THREADS" ]; then
-       THREADS=$((RAMKB / 16384))
-       [ $THREADS -gt $MAX_THREADS ] && THREADS=$MAX_THREADS
-fi
-[ "$SIZE" ] || SIZE=$((RAMKB * 2))
-[ "$RSIZE" ] || RSIZE=512
-[ "$UID" ] || UID=1000
-[ "$MOUNT" ] || MOUNT=/mnt/lustre
-[ "$MOUNT2" ] || MOUNT2=${MOUNT}2
-[ "$TMP" ] || TMP=/tmp
-[ "$COUNT" ] || COUNT=1000
-[ "$DEBUG_LVL" ] || DEBUG_LVL=0
-[ "$DEBUG_OFF" ] || DEBUG_OFF="eval lctl set_param debug=\"$DEBUG_LVL\""
-[ "$DEBUG_ON" ] || DEBUG_ON="eval lctl set_param debug=0x33f0484"
-
 export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE RACER REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL REPLAY_VBR INSANITY SANITY_QUOTA PERFORMANCE_SANITY LARGE_SCALE RECOVERY_MDS_SCALE RECOVERY_DOUBLE_SCALE RECOVERY_RANDOM_SCALE PARALLEL_SCALE METADATA_UPDATES OST_POOLS SANITY_BENCHMARK LNET_SELFTEST MMP OBDFILTER_SURVEY SGPDD_SURVEY"
 
 if [ "$ACC_SM_ONLY" ]; then
@@ -38,7 +19,6 @@ fi
 
 LIBLUSTRETESTS=${LIBLUSTRETESTS:-../liblustre/tests}
 
-STARTTIME=`date +%s`
 RANTEST=""
 
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
@@ -71,8 +51,19 @@ setup_if_needed() {
     fi
 }
 
+find_in_path() {
+    target=$1
+    for dir in $(tr : " " <<< $PATH); do
+      if [ -e $dir/$target ]; then
+          echo "$dir/$target found in PATH"
+          return 0
+      fi
+    done
+    return 1
+}
+
 title() {
-    # update titlebar if stdin is attaached to an xterm
+    # update titlebar if stdin is attached to an xterm
     if ${UPDATE_TITLEBAR:-false}; then
        if tty -s; then
            case $TERM in 
@@ -86,414 +77,91 @@ title() {
     RANTEST=${RANTEST}$*", "
 }
 
-skip_remost()
-{
+skip_remost() {
        remote_ost_nodsh && log "SKIP: $1: remote OST with nodsh" && return 0
        return 1
 }
 
-skip_remmds()
-{
+skip_remmds() {
        remote_mds_nodsh && log "SKIP: $1: remote MDS with nodsh" && return 0
        return 1
 }
 
-for NAME in $CONFIGS; do
-       export NAME MOUNT START CLEAN
-       . $LUSTRE/tests/cfg/$NAME.sh
-
-       assert_env mds_HOST MDS_MKFS_OPTS MDSDEV
-       assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
-       assert_env FSNAME MOUNT MOUNT2
-
-       setup_if_needed
-
-       MSKIPPED=0
-       OSKIPPED=0
-       if [ "$RUNTESTS" != "no" ]; then
-               title runtests
-               bash runtests
-               $CLEANUP
-               $SETUP
-               RUNTESTS="done"
-       fi
-
-       if [ "$SANITY" != "no" ]; then
-               title sanity
-               MOUNT2="" bash sanity.sh
-               $CLEANUP
-               $SETUP
-               SANITY="done"
-       fi
-
-       which dbench > /dev/null 2>&1 || DBENCH=no
-       if [ "$DBENCH" != "no" ]; then
-               title dbench
-               DBENCHDIR=$MOUNT/$HOSTNAME
-               mkdir -p $DBENCHDIR
-               SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-               DB_THREADS=$((SPACE / 50000))
-               [ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
-
-               $DEBUG_OFF
-               myUID=$RUNAS_ID
-               myGID=$RUNAS_GID
-               myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myGID $myRUNAS || \
-                       { myRUNAS="" && myUID=$UID && myGID=`id -g $USER`; }
-               chown $myUID:$myGID $DBENCHDIR
-               duration=""
-               [ "$SLOW" = "no" ] && duration=" -t 120"
-               if [ "$SLOW" != "no" -o $DB_THREADS -eq 1 ]; then
-                       $myRUNAS bash rundbench -D $DBENCHDIR 1 $duration || error "dbench failed!"
-                       $DEBUG_ON
-                       $CLEANUP
-                       $SETUP
-               fi
-               if [ $DB_THREADS -gt 1 ]; then
-                       $DEBUG_OFF
-                       $myRUNAS bash rundbench -D $DBENCHDIR $DB_THREADS $duration
-                       $DEBUG_ON
-                       $CLEANUP
-                       $SETUP
-               fi
-               rm -rf $DBENCHDIR
-               DBENCH="done"
-       fi
-
-       which bonnie++ > /dev/null 2>&1 || BONNIE=no
-       if [ "$BONNIE" != "no" ]; then
-               title bonnie
-               BONDIR=$MOUNT/d0.bonnie
-               mkdir -p $BONDIR
-               $LFS setstripe -c -1 $BONDIR
-               sync
-               MIN=`lctl get_param -n osc.*.kbytesavail | sort -n | head -n1`
-               SPACE=$(( OSTCOUNT * MIN ))
-               [ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
-               log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
-               $DEBUG_OFF
-               myUID=$RUNAS_ID
-               myGID=$RUNAS_GID
-               myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myGID $myRUNAS || \
-                       { myRUNAS="" && myUID=$UID && myGID=`id -g $USER`; }
-               chown $myUID:$myGID $BONDIR             
-               $myRUNAS bonnie++ -f -r 0 -s$((SIZE / 1024)) -n 10 -u$myUID:$myGID -d$BONDIR
-               $DEBUG_ON
-               $CLEANUP
-               $SETUP
-               BONNIE="done"
-       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
-               IOZDIR=$MOUNT/d0.iozone
-               mkdir -p $IOZDIR
-               $LFS setstripe -c -1 $IOZDIR
-               sync
-               MIN=`lctl get_param -n osc.*.kbytesavail | sort -n | head -n1`
-               SPACE=$(( OSTCOUNT * MIN ))
-               [ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
-               log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
-               IOZONE_OPTS="-i 0 -i 1 -i 2 -e -+d -r $RSIZE"
-               IOZFILE="$IOZDIR/iozone"
-               IOZLOG=$TMP/iozone.log
-               # $SPACE was calculated with all OSTs
-               $DEBUG_OFF
-               myUID=$RUNAS_ID
-               myGID=$RUNAS_GID
-               myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myGID $myRUNAS || \
-                       { myRUNAS="" && myUID=$UID && myGID=`id -g $USER`; }
-               chown $myUID:$myGID $IOZDIR
-               $myRUNAS iozone $IOZONE_OPTS -s $SIZE -f $IOZFILE 2>&1 | tee $IOZLOG
-               tail -1 $IOZLOG | grep -q complete || \
-                       { error "iozone (1) failed" && false; }
-               rm -f $IOZLOG
-               $DEBUG_ON
-               $CLEANUP
-               $SETUP
+# cleanup the logs of all suites
+cleanup_log () {
+    local suite
+    local o=$(echo $O | tr "[:upper:]" "[:lower:]")
+    o=${o//_/-}
+    
+    rm -f ${TMP}/${o}.log
+}
 
-               # check if O_DIRECT support is implemented in kernel
-               if [ -z "$O_DIRECT" ]; then
-                       touch $MOUNT/f.iozone
-                       if ! ./directio write $MOUNT/f.iozone 0 1; then
-                               log "SKIP iozone DIRECT IO test"
-                               O_DIRECT=no
-                       fi
-                       rm -f $MOUNT/f.iozone
-               fi
-               if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then
-                       $DEBUG_OFF
-                       $myRUNAS iozone -I $IOZONE_OPTS -s $SIZE -f $IOZFILE.odir 2>&1 | tee $IOZLOG
-                       tail -1 $IOZLOG | grep -q complete || \
-                               { error "iozone (2) failed" && false; }
-                       rm -f $IOZLOG
-                       $DEBUG_ON
-                       $CLEANUP
-                       $SETUP
-               fi
+cleanup_logs () {
+    local suite
+    for suite in ${ACC_SM_ONLY:-$TESTSUITE_LIST}; do
+        cleanup_log $suite
+    done
+}
 
-               SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-               IOZ_THREADS=$((SPACE / SIZE * 2 / 3 ))
-               [ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
-               IOZVER=`iozone -v | awk '/Revision:/ {print $3}' | tr -d .`
-               if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
-                       $LFS setstripe -c -1 $IOZDIR
-                       $DEBUG_OFF
-                       THREAD=1
-                       IOZFILE=" "
-                       while [ $THREAD -le $IOZ_THREADS ]; do
-                               IOZFILE="$IOZFILE $IOZDIR/iozone.$THREAD"
-                               THREAD=$((THREAD + 1))
-                       done
-                       $myRUNAS iozone $IOZONE_OPTS -s $((SIZE / IOZ_THREADS)) -t $IOZ_THREADS -F $IOZFILE 2>&1 | tee $IOZLOG
-                       tail -1 $IOZLOG | grep -q complete || \
-                               { error "iozone (3) failed" && false; }
-                       rm -f $IOZLOG
-                       $DEBUG_ON
-                       $CLEANUP
-                       $SETUP
-               elif [ $IOZVER -lt 3145 ]; then
-                       VER=`iozone -v | awk '/Revision:/ { print $3 }'`
-                       echo "iozone $VER too old for multi-thread test"
-               fi
-               IOZONE="done"
-       fi
+export NAME MOUNT START CLEAN
+. $LUSTRE/tests/cfg/$NAME.sh
+
+assert_env mds_HOST MDS_MKFS_OPTS MDSDEV
+assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
+assert_env FSNAME MOUNT MOUNT2
+
+setup_if_needed
+
+for s in ${ACC_SM_ONLY:-$TESTSUITE_LIST}; do
+    suite_name=$(echo ${s%.sh} | tr "[:upper:]_" "[:lower:]-" )
+    suite=$(echo ${suite_name} | tr "[:lower:]-" "[:upper:]_")
+    suite_only=ONLY # Change to ${suite}_ONLY after fixing YALA
+
+    if is_sanity_benchmark ${suite_name}; then
+        suite_only=suite_name
+        suite_script=$LUSTRE/tests/sanity-benchmark.sh
+    elif [ -e $LUSTRE/tests/${suite_name}.sh ]; then
+        suite_script=$LUSTRE/tests/${suite_name}.sh
+    elif [ -e $LUSTRE/tests/$suite_name ]; then
+        suite_script=$LUSTRE/tests/$suite_name
+    elif find_in_path $suite_name; then
+        suite_script=${suite_name}
+    elif find_in_path ${suite_name}.sh; then
+        suite_script=${suite_name}.sh
+    else
+        echo "Can't find test script for $suite_name"
+        exit 1
+    fi
 
-       if [ "$FSX" != "no" ]; then
-               title fsx
-               FSX_SIZE=$((RAMKB / 2))
-               SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-               [ $SPACE -lt $FSX_SIZE ] && FSX_SIZE=$((SPACE * 3 / 4))
-               $DEBUG_OFF
-               FSX_SEED=${FSX_SEED:-$RANDOM}
-               rm -f $MOUNT/fsxfile
-               $LFS setstripe -c -1 $MOUNT/fsxfile
-               echo Using FSX_SEED=$FSX_SEED FSX_SIZE=$FSX_SIZE COUNT=$COUNT
-               ./fsx -c 50 -p 1000 -S $FSX_SEED -P $TMP -l $FSX_SIZE \
-                       -N $(($COUNT * 100)) $MOUNT/fsxfile
-               $DEBUG_ON
-               $CLEANUP
-               $SETUP
-               FSX="done"
-       fi      
+    echo "$suite_script located."
 
-       if [ "$SANITYN" != "no" ]; then
-               title sanityN
-               bash sanityN.sh
-               $CLEANUP
-               $SETUP
-               SANITYN="done"
-       fi
+    if [[ ${!suite} = no ]]; then
+        echo "Skipping $suite_name"
+        continue
+    fi
 
-       if [ "$LFSCK" != "no" ]; then
-               title lfsck
-               bash lfscktest.sh
-               LFSCK="done"
-       fi
+    start_ts=$(date +%s)
+    title $suite_name
+    bash $suite_script ${!suite_only}
+    rc=$?
+    duration=$(($(date +%s) - $start_ts))
+    if [ $rc -ne 0 ]; then
+        RC=$rc
+        status="FAIL"
+    else
+        status="PASS"
+    fi
+    echo "Script: $status"
 
-       [ "$NETTYPE" = "tcp" -o "$NETTYPE" = "ptl" ] || LIBLUSTRE=no # bug 15660
-       if [ "$LIBLUSTRE" != "no" ] && ! check_versions ; then
-               skip liblustre version mismatch: cli $CLIVER, mds $MDSVER, ost $OSTVER
-               LIBLUSTRE=no    # bug 17696
-       fi
-       if [ "$LIBLUSTRE" != "no" ]; then
-               title liblustre
-               assert_env MGSNID MOUNT2
-               export LIBLUSTRE_MOUNT_POINT=$MOUNT2
-               export LIBLUSTRE_MOUNT_RETRY=5
-               export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
-               export LIBLUSTRE_TIMEOUT=`lctl get_param -n timeout`
-               #export LIBLUSTRE_DEBUG_MASK=`lctl get_param -n debug`
-               if [ -x $LIBLUSTRETESTS/sanity ]; then
-                       mkdir -p $MOUNT2
-                       if [ "$LIBLUSTRE_EXCEPT" ]; then
-                               LIBLUSTRE_OPT="$LIBLUSTRE_OPT \
-                                       $(echo ' '$LIBLUSTRE_EXCEPT  | sed -re 's/\s+/ -e /g')"
-                       fi
-                       echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET $LIBLUSTRE_OPT
-                       $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET $LIBLUSTRE_OPT
-               fi
-               $CLEANUP
-               #$SETUP
-               LIBLUSTRE="done"
-       fi
 
-       [ "$RACER" != "no" ] && [ -n "$CLIENTS" -a "$PDSH" = "no_dsh" ] && log "Remote client with no_dsh" && RACER=no 
-       if [ "$RACER" != "no" ]; then
-               title racer
-               setup_if_needed
-               DURATION=${DURATION:-900}
-               [ "$SLOW" = "no" ] && DURATION=300
-               RACERCLIENTS=$HOSTNAME
-               [ ! -z ${CLIENTS} ] && RACERCLIENTS=$CLIENTS
-               log "racer on clients: $RACERCLIENTS DURATION=$DURATION RACERDIRS=$RACERDIRS"
-               CLIENTS=${RACERCLIENTS} DURATION=$DURATION bash runracer $RACERDIRS
-               $CLEANUP
-               $SETUP
-               RACER="done"
-       fi
+    $CLEANUP
+    [ x$suite = xSGPDD_SURVEY ] || $SETUP
+    eval ${suite}="done"
 done
 
-if [ "$SANITY_BENCHMARK" != "no" ]; then
-        title sanity-benchmark
-        bash sanity-benchmark.sh
-        SANITY_BENCHMARK="done"
-fi
-
-[ "$REPLAY_SINGLE" != "no" ] && skip_remmds replay-single && REPLAY_SINGLE=no && MSKIPPED=1
-if [ "$REPLAY_SINGLE" != "no" ]; then
-        title replay-single
-       bash replay-single.sh
-       REPLAY_SINGLE="done"
-fi
-
-[ "$CONF_SANITY" != "no" ] && skip_remmds conf-sanity && CONF_SANITY=no && MSKIPPED=1
-[ "$CONF_SANITY" != "no" ] && skip_remost conf-sanity && CONF_SANITY=no && OSKIPPED=1
-if [ "$CONF_SANITY" != "no" ]; then
-        title conf-sanity
-        bash conf-sanity.sh
-        CONF_SANITY="done"
-fi
-
-[ "$RECOVERY_SMALL" != "no" ] && skip_remmds recover-small && RECOVERY_SMALL=no && MSKIPPED=1
-if [ "$RECOVERY_SMALL" != "no" ]; then
-        title recovery-small
-        bash recovery-small.sh
-        RECOVERY_SMALL="done"
-fi
-
-[ "$REPLAY_OST_SINGLE" != "no" ] && skip_remost replay-ost-single && REPLAY_OST_SINGLE=no && OSKIPPED=1
-if [ "$REPLAY_OST_SINGLE" != "no" ]; then
-        title replay-ost-single
-        bash replay-ost-single.sh
-        REPLAY_OST_SINGLE="done"
-fi
-
-[ "$REPLAY_DUAL" != "no" ] && skip_remost replay-dual && REPLAY_DUAL=no && OSKIPPED=1
-if [ "$REPLAY_DUAL" != "no" ]; then
-        title replay-dual
-        bash replay-dual.sh
-        REPLAY_DUAL="done"
-fi
-
-[ "$REPLAY_VBR" != "no" ] && skip_remmds replay-vbr && REPLAY_VBR=no && MSKIPPED=1
-if [ "$REPLAY_VBR" != "no" ]; then
-        title replay-vbr
-        bash replay-vbr.sh
-        REPLAY_VBR="done"
-fi
-
-[ "$INSANITY" != "no" ] && skip_remmds insanity && INSANITY=no && MSKIPPED=1
-[ "$INSANITY" != "no" ] && skip_remost insanity && INSANITY=no && OSKIPPED=1
-if [ "$INSANITY" != "no" ]; then
-        title insanity
-        bash insanity.sh -r
-        INSANITY="done"
-fi
-
-[ "$SANITY_QUOTA" != "no" ] && skip_remmds sanity-quota && SANITY_QUOTA=no && MSKIPPED=1
-[ "$SANITY_QUOTA" != "no" ] && skip_remost sanity-quota && SANITY_QUOTA=no && OSKIPPED=1
-if [ "$SANITY_QUOTA" != "no" ]; then
-        title sanity-quota
-        bash sanity-quota.sh
-        SANITY_QUOTA="done"
-fi
-
-
-[ "$SLOW" = no ] && PERFORMANCE_SANITY="no"
-[ -x "$MDSRATE" ] || PERFORMANCE_SANITY="no"
-which mpirun > /dev/null 2>&1 || PERFORMANCE_SANITY="no"
-if [ "$PERFORMANCE_SANITY" != "no" ]; then
-        title performance-sanity
-        bash performance-sanity.sh
-        PERFORMANCE_SANITY="done"
-fi
-
-[ "$LARGE_SCALE" != "no" ] && skip_remmds large-scale && LARGE_SCALE=no && MSKIPPED=1
-if [ "$LARGE_SCALE" != "no" ]; then
-        title large-scale
-        bash large-scale.sh
-        LARGE_SCALE="done"
-fi
-
-[ "$RECOVERY_MDS_SCALE" != "no" ] && skip_remmds recovery-mds-scale && RECOVERY_MDS_SCALE=no && MSKIPPED=1
-[ "$RECOVERY_MDS_SCALE" != "no" ] && skip_remost recovery-mds-scale && RECOVERY_MDS_SCALE=no && OSKIPPED=1
-if [ "$RECOVERY_MDS_SCALE" != "no" ]; then
-        title recovery-mds-scale
-        bash recovery-mds-scale.sh
-        RECOVERY_MDS_SCALE="done"
-fi
-
-[ "$RECOVERY_DOUBLE_SCALE" != "no" ] && skip_remmds recovery-double-scale && RECOVERY_DOUBLE_SCALE=no && MSKIPPED=1
-[ "$RECOVERY_DOUBLE_SCALE" != "no" ] && skip_remost recovery-double-scale && RECOVERY_DOUBLE_SCALE=no && OSKIPPED=1
-if [ "$RECOVERY_DOUBLE_SCALE" != "no" ]; then
-        title recovery-double-scale
-        bash recovery-double-scale.sh
-        RECOVERY_DOUBLE_SCALE="done"
-fi
-
-[ "$RECOVERY_RANDOM_SCALE" != "no" ] && skip_remmds recovery-random-scale && RECOVERY_RANDOM_SCALE=no && MSKIPPED=1
-if [ "$RECOVERY_RANDOM_SCALE" != "no" ]; then
-        title recovery-random-scale
-        bash recovery-random-scale.sh
-        RECOVERY_RANDOM_SCALE="done"
-fi
-
-which mpirun > /dev/null 2>&1 || PARALLEL_SCALE="no"
-if [ "$PARALLEL_SCALE" != "no" ]; then
-        title parallel-scale
-        bash parallel-scale.sh
-        PARALLEL_SCALE="done"
-fi
-
-if [ "$METADATA_UPDATES" != "no" ]; then
-        title metadata-updates
-        bash metadata-updates.sh
-        METADATA_UPDATES="done"
-fi
-
-[ "$OST_POOLS" != "no" ] && skip_remmds ost-pools && OST_POOLS=no && MSKIPPED=1
-[ "$OST_POOLS" != "no" ] && skip_remost ost-pools && OST_POOLS=no && OSKIPPED=1
-if [ "$OST_POOLS" != "no" ]; then
-        title ost-pools
-        bash ost-pools.sh
-        OST_POOLS="done"
-fi
-
-if [ "$LNET_SELFTEST" != "no" ]; then
-        title lnet-selftest
-        bash lnet-selftest.sh
-        LNET_SELFTEST="done"
-fi
-
-if [ "$MMP" != "no" ]; then
-        title mmp
-        bash mmp.sh
-        MMP="done"
-fi
-
-if [ "$OBDFILTER_SURVEY" != "no" ]; then
-        title obdfilter-survey
-        bash obdfilter-survey.sh
-        OBDFILTER_SURVEY="done"
-fi
-
-if [ "$SGPDD_SURVEY" != "no" ] && [ "$SGPDD_YES" ] && [ "$REFORMAT" ]; then
-        title sgpdd-survey
-        bash sgpdd-survey.sh
-        SGPDD_SURVEY="done"
-fi
-
 RC=$?
 title FINISHED
-echo "Finished at `date` in $((`date +%s` - $STARTTIME))s"
+echo "Finished at `date` in ${SECONDS}s"
 echo "Tests ran: $RANTEST"
 print_summary
 [ "$MSKIPPED" = 1 ] && log "FAIL: remote MDS tests skipped" && RC=1
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from lustre/tests/lfscktest.sh
rename to lustre/tests/lfsck.sh
diff --git a/lustre/tests/liblustre.sh b/lustre/tests/liblustre.sh
new file mode 100644 (file)
index 0000000..12af4d7
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+#set -vx
+
+set -e
+
+LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+. $LUSTRE/tests/test-framework.sh
+init_test_env $@
+. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
+LIBLUSTRETESTS=${LIBLUSTRETESTS:-$LUSTRE/liblustre/tests}
+
+assert_env MGSNID MOUNT2
+export LIBLUSTRE_MOUNT_POINT=$MOUNT2
+export LIBLUSTRE_MOUNT_RETRY=5
+export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
+export LIBLUSTRE_TIMEOUT=`lctl get_param -n timeout`
+#export LIBLUSTRE_DEBUG_MASK=`lctl get_param -n debug`
+
+test_1() {
+    if ! check_versions; then
+       skip "liblustre version mismatch: cli $CLIVER, mds $MDSVER, ost $OSTVER"
+    elif ! [ "$NETTYPE" = "tcp" -o "$NETTYPE" = "ptl" ]; then
+       skip "NETTYPE=$NETTYPE unsupported for liblustre"
+    elif [ ! -x $LIBLUSTRETESTS/sanity ]; then
+       skip "$LIBLUSTRETESTS/sanity: not found"
+    else
+       mkdir -p $MOUNT2
+       echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
+       $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
+       if [ "$LIBLUSTRE_EXCEPT" ]; then
+           LIBLUSTRE_OPT="$LIBLUSTRE_OPT \
+                       $(echo ' '$LIBLUSTRE_EXCEPT  | sed -re 's/\s+/ -e /g')"
+       fi
+       echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET $LIBLUSTRE_OPT
+       $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET $LIBLUSTRE_OPT
+    fi
+}
+run_test 1 "liblustre sanity"
+
+complete $(basename $0) $SECONDS
+check_and_cleanup_lustre
+exit_status
diff --git a/lustre/tests/racer.sh b/lustre/tests/racer.sh
new file mode 100644 (file)
index 0000000..f862012
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+bash $(dirname $0)/runracer $@
index 1f12b76..df615a1 100644 (file)
@@ -6,6 +6,8 @@
 
 set -e
 
+ONLY=${ONLY:-"$*"}
+
 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
index 529e123..a4cb94a 100644 (file)
@@ -58,10 +58,11 @@ print_summary () {
         [ "${!O}" = "no" ] && continue || true
         local o=$(echo $O | tr "[:upper:]" "[:lower:]")
         o=${o//_/-}
-        o=${o//tyn/tyN}
         local log=${TMP}/${o}.log
-        [ "$o" = lfsck ] && log=${TMP}/lfscktest.log
         [ "$o" = racer ] && log=${TMP}/runracer.log
+        if is_sanity_benchmark $o; then
+            log=${TMP}/sanity-benchmark.log
+        fi
         local slow=
         local skipped=
         local total=
@@ -3669,3 +3670,13 @@ else
 fi;"
 }
 
+is_sanity_benchmark() {
+    local benchmarks="dbench bonnie iozone fsx"
+    local suite=$1
+    for b in $benchmarks; do
+        if [ "$b" == "$suite" ]; then
+            return 0
+        fi
+    done
+    return 1
+}