X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-gss.sh;h=8b695b6eae38c3b9b6af55179fd11d4ccc794a41;hb=28806162c234a178365853a393aa401e180256e2;hp=b9e8e4615c7f85a390c80afe57f77fe58d44fe06;hpb=d4895c56dbda7d4f5107d71ca96434cb4f37b2b8;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-gss.sh b/lustre/tests/sanity-gss.sh index b9e8e46..8b695b6 100644 --- a/lustre/tests/sanity-gss.sh +++ b/lustre/tests/sanity-gss.sh @@ -1,5 +1,4 @@ #!/bin/bash -# vim:shiftwidth=4:softtabstop=4:tabstop=4: # # Run select tests by setting ONLY, or as arguments to the script. # Skip specific tests by setting EXCEPT. @@ -12,10 +11,6 @@ ONLY=${ONLY:-"$*"} ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$SANITY_GSS_EXCEPT"} # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -# Tests that fail on uml -CPU=`awk '/model/ {print $4}' /proc/cpuinfo` -[ "$CPU" = "UML" ] && EXCEPT="$EXCEPT" - SRCDIR=`dirname $0` export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$SRCDIR/../utils/gss:$PATH:/sbin export NAME=${NAME:-local} @@ -351,35 +346,34 @@ test_6() { run_test 6 "test basic DLM callback works" test_7() { - local tdir=$DIR/d7 - local num_osts - - # - # for open(), client only reserve space for default stripe count lovea, - # and server may return larger lovea in reply (because of larger stripe - # count), client need call enlarge_reqbuf() and save the replied lovea - # in request for future possible replay. - # - # Note: current script does NOT guarantee enlarge_reqbuf() will be in - # the path, however it does work in local test which has 2 OSTs and - # default stripe count is 1. - # - num_osts=`$LFS getstripe $MOUNT | egrep "^[0-9]*:.*ACTIVE" | wc -l` - echo "found $num_osts active OSTs" - [ $num_osts -lt 2 ] && echo "skipping $TESTNAME (must have >= 2 OSTs)" && return - - mkdir $tdir || error - $LFS setstripe -c $num_osts $tdir || error - - echo "creating..." - for ((i=0;i<20;i++)); do - dd if=/dev/zero of=$tdir/f$i bs=4k count=16 2>/dev/null - done - echo "reading..." - for ((i=0;i<20;i++)); do - dd if=$tdir/f$i of=/dev/null bs=4k count=16 2>/dev/null - done - rm -rf $tdir + local tdir=$DIR/d7 + local num_osts + + # for open(), client only reserve space for default stripe count lovea, + # and server may return larger lovea in reply (because of larger stripe + # count), client need call enlarge_reqbuf() and save the replied lovea + # in request for future possible replay. + # + # Note: current script does NOT guarantee enlarge_reqbuf() will be in + # the path, however it does work in local test which has 2 OSTs and + # default stripe count is 1. + num_osts=$($LFS getstripe $MOUNT | egrep "^[0-9]*:.*ACTIVE" | wc -l) + echo "found $num_osts active OSTs" + [ $num_osts -lt 2 ] && + echo "skipping $TESTNAME (must have >= 2 OSTs)" && return + + mkdir $tdir || error "mkdir $tdir failed" + $LFS setstripe -c $num_osts $tdir || error "setstripe -c $num_osts" + + echo "creating..." + for ((i = 0; i < 20; i++)); do + dd if=/dev/zero of=$tdir/f$i bs=4k count=16 2>/dev/null + done + echo "reading..." + for ((i = 0; i < 20; i++)); do + dd if=$tdir/f$i of=/dev/null bs=4k count=16 2>/dev/null + done + rm -rf $tdir } run_test 7 "exercise enlarge_reqbuf()"