From 9e4ca2d9176b462169b8defc52a06ed3d0a6739b Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 28 Jan 2004 18:20:52 +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/oos2.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lustre/tests/oos2.sh b/lustre/tests/oos2.sh index 892959f..1680b36 100644 --- a/lustre/tests/oos2.sh +++ b/lustre/tests/oos2.sh @@ -49,6 +49,14 @@ if [ "`grep -c 'No space left on device' $LOG`" -ne 2 ]; then SUCCESS=0 fi +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 + total_records() { tot=0 for i in `grep "records out" $1 | cut -d+ -f 1`; do @@ -58,19 +66,6 @@ total_records() { } RECORDSOUT=`total_records $LOG` -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 $((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 - FILESIZE=$((`ls -l $OOS | awk '{print $5}'` + `ls -l $OOS2 | awk '{print $5}'`)) if [ $RECORDSOUT -ne $(($FILESIZE / 1024)) ]; then echo "ERROR: blocks written by dd not equal to the size of file" -- 1.8.3.1