X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Facceptance-small.sh;h=6bdadc066454b56fad4c409069a3bbe4764b6707;hb=2519c59f2015ac10110149b0e4e127865fefca1d;hp=b731a2651771fce1932074ac42458a1d1b63cd42;hpb=99a89f7f0127db8c25df1b495f1078bd84893725;p=fs%2Flustre-release.git diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index b731a26..6bdadc0 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" @@ -100,27 +95,33 @@ for NAME in $CONFIGS; do 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 + myRUNAS=$RUNAS + FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; } + chown $myUID:$myUID $DBENCHDIR duration="" [ "$SLOW" = "no" ] && duration=" -t 120" if [ "$SLOW" != "no" -o $DB_THREADS -eq 1 ]; then - bash rundbench 1 $duration + DIR=$DBENCHDIR $myRUNAS bash rundbench 1 $duration $DEBUG_ON $CLEANUP $SETUP fi if [ $DB_THREADS -gt 1 ]; then $DEBUG_OFF - bash rundbench $DB_THREADS $duration + DIR=$DBENCHDIR $myRUNAS bash rundbench $DB_THREADS $duration $DEBUG_ON $CLEANUP $SETUP fi - rm -f /mnt/lustre/`hostname`/client.txt + rm -rf $DBENCHDIR DBENCH="done" fi @@ -138,7 +139,7 @@ for NAME in $CONFIGS; do $DEBUG_OFF myUID=$RUNAS_ID myRUNAS=$RUNAS - FAIL_ON_ERROR=false check_runas_id $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; } + FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; } chown $myUID:$myUID $BONDIR $myRUNAS bonnie++ -f -r 0 -s$((SIZE / 1024)) -n 10 -u$myUID:$myUID -d$BONDIR $DEBUG_ON @@ -148,21 +149,28 @@ 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 - mkdir -p $MOUNT/d0.iozone - $LFS setstripe -c -1 $MOUNT/d0.iozone + IOZDIR=$MOUNT/d0.iozone + mkdir -p $IOZDIR + $LFS setstripe -c -1 $IOZDIR sync MIN=`cat /proc/fs/lustre/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 -s $SIZE" - IOZFILE="$MOUNT/d0.iozone/iozone" + IOZFILE="$IOZDIR/iozone" # $SPACE was calculated with all OSTs $DEBUG_OFF - iozone $IOZONE_OPTS -f $IOZFILE + myUID=$RUNAS_ID + myRUNAS=$RUNAS + FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; } + chown $myUID:$myUID $IOZDIR + $myRUNAS iozone $IOZONE_OPTS -f $IOZFILE $DEBUG_ON $CLEANUP $SETUP @@ -177,7 +185,8 @@ for NAME in $CONFIGS; do fi if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then $DEBUG_OFF - iozone -I $IOZONE_OPTS $IOZFILE.odir + # cd TMP to have write permission for tmp file iozone writes + ( cd $TMP && $myRUNAS iozone -I $IOZONE_OPTS $IOZFILE.odir ) $DEBUG_ON $CLEANUP $SETUP @@ -188,15 +197,15 @@ for NAME in $CONFIGS; do [ $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 $MOUNT/d0.iozone + $LFS setstripe -c 1 $IOZDIR $DEBUG_OFF THREAD=1 IOZFILE="-F " while [ $THREAD -le $IOZ_THREADS ]; do - IOZFILE="$IOZFILE $MOUNT/iozone.$THREAD" + IOZFILE="$IOZFILE $IOZDIR/iozone.$THREAD" THREAD=$((THREAD + 1)) done - iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZFILE + $myRUNAS iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZFILE $DEBUG_ON $CLEANUP $SETUP @@ -241,8 +250,9 @@ for NAME in $CONFIGS; do E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2` if grep -q obdfilter /proc/fs/lustre/devices; then if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \ - [ "`echo $E2VER | grep cfs`" ]; then - bash lfscktest.sh + [ "`echo $E2VER | grep cfs`" -o \ + "`echo $E2VER | grep sun`" ]; then + bash lfscktest.sh else e2fsck -V echo "e2fsck does not support lfsck, skipping"