From 3d6a42659a4a3bd98ba55a7a073d3a10e3a55723 Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 26 Jan 2004 17:54:09 +0000 Subject: [PATCH] Merge HEAD->bug974 (20040126_1001). b=974 --- lustre/tests/oos2.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lustre/tests/oos2.sh b/lustre/tests/oos2.sh index 9bfb134..892959f 100644 --- a/lustre/tests/oos2.sh +++ b/lustre/tests/oos2.sh @@ -19,7 +19,7 @@ SUCCESS=1 rm -f $OOS $OOS2 $LOG STRIPECOUNT=`cat /proc/fs/lustre/lov/*/activeobd | head -1` -ORIGFREE=`df | grep " $MOUNT$" | awk '{ print $4 }'` +ORIGFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -1` MAXFREE=${MAXFREE:-$((200000 * $STRIPECOUNT))} if [ $ORIGFREE -gt $MAXFREE ]; then echo "skipping out-of-space test on $OSC" @@ -58,15 +58,16 @@ total_records() { } RECORDSOUT=`total_records $LOG` -LEFTFREE=`df | grep " $MOUNT$" | awk '{ print $4 }'` +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" fi -if [ $LEFTFREE -gt $((100 * $STRIPECOUNT)) ]; then +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 @@ -76,7 +77,7 @@ if [ $RECORDSOUT -ne $(($FILESIZE / 1024)) ]; then SUCCESS=0 fi -rm -f $OOS $LOG +rm -f $OOS $OOS2 $LOG if [ $SUCCESS -eq 1 ]; then echo "Success!" -- 1.8.3.1