From 03712c7c33a8a85dd92c6053763708b3202ff18e Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 28 Jan 2004 18:20:51 +0000 Subject: [PATCH] Fix oos.sh and oos2.sh test so that we don't fail test if one OST is full and returns ENOSPC but others have space. Update lov.sh to match local.sh setup more closely. Add a "client" config to lov.sh and local.sh so they can be mounted easily on /mnt/lustre2 for sanityN.sh testing. b=974 --- lustre/tests/oos.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lustre/tests/oos.sh b/lustre/tests/oos.sh index d2f1bc8..75afd5d 100755 --- a/lustre/tests/oos.sh +++ b/lustre/tests/oos.sh @@ -34,25 +34,20 @@ if dd if=/dev/zero of=$OOS count=$(($ORIGFREE + 100)) bs=1k 2> $LOG; then SUCCESS=0 fi -RECORDSOUT=`grep "records out" $LOG | cut -d + -f1` - -if [ -z "`grep "No space left on device" $LOG`" ]; then +if [ "`grep -c 'No space left on device' $LOG`" -ne 1 ]; then echo "ERROR: dd not return ENOSPC" SUCCESS=0 fi -LEFTFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -1` -if [ $(($ORIGFREE - $LEFTFREE)) -lt $RECORDSOUT ]; then - echo "ERROR: space used by dd not equal to available space" - SUCCESS=0 - echo "$ORIGFREE - $LEFTFREE $RECORDSOUT" +for AVAIL in /proc/fs/lustre/osc/OSC*MNT*/kbytesavail; do + [ `cat $AVAIL` -lt 400 ] && OSCFULL=full +done +if [ -z "$OSCFULL" ]; then + echo "no OSTs are close to full" + grep "[0-9]" /proc/fs/lustre/osc/OSC*MNT*/{kbytesavail,cur*} fi -if [ $LEFTFREE -gt $((400 * $STRIPECOUNT)) ]; then - echo "ERROR: too much space left $LEFTFREE and -ENOSPC returned" - grep "[0-9]" /proc/fs/lustre/osc/OSC*MNT*/cur* - SUCCESS=0 -fi +RECORDSOUT=`grep "records out" $LOG | cut -d + -f1` FILESIZE=`ls -l $OOS | awk '{ print $5 }'` if [ $RECORDSOUT -ne $(($FILESIZE / 1024)) ]; then -- 1.8.3.1