From ff7b8da006f87cca05c4215938ee0e1baadf09ce Mon Sep 17 00:00:00 2001 From: scjody Date: Fri, 11 May 2007 19:47:17 +0000 Subject: [PATCH] Branch b1_6 Fix sanity test 78: 1. Detects write failures and failing the test. 2. Writes a file small enough not to fill up any OST. 3. Unlinks the file at the end of the test. b=12326 i=adilger i=shadow --- lustre/tests/sanity.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 39db040..e1aec5c 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -3097,8 +3097,13 @@ test_78() { # bug 10901 F78SIZE=$(($(awk '/MemFree:/ { print $2 }' /proc/meminfo) / 1024)) [ $F78SIZE -gt 512 ] && F78SIZE=512 [ $F78SIZE -gt $((MAXFREE / 1024)) ] && F78SIZE=$((MAXFREE / 1024)) - $SETSTRIPE $DIR/$tfile 0 -1 -1 - $DIRECTIO rdwr $DIR/$tfile 0 $F78SIZE 1048576 + SMALLESTOST=`lfs df $DIR |grep OST | awk '{print $4}' |sort -n |head -1` + [ $F78SIZE -gt $((SMALLESTOST * $OSTCOUNT / 1024)) ] && \ + F78SIZE=$((SMALLESTOST * $OSTCOUNT / 1024)) + $SETSTRIPE $DIR/$tfile 0 -1 -1 || error "setstripe failed" + $DIRECTIO rdwr $DIR/$tfile 0 $F78SIZE 1048576 || error "rdwr failed" + + rm -f $DIR/$tfile } run_test 78 "handle large O_DIRECT writes correctly ============" -- 1.8.3.1