Whamcloud - gitweb
b=13854
authoryury <yury>
Fri, 19 Oct 2007 09:54:48 +0000 (09:54 +0000)
committeryury <yury>
Fri, 19 Oct 2007 09:54:48 +0000 (09:54 +0000)
r=adilger,nathan
- fixed LVF calculation in sanity test 124a.

lustre/tests/sanity.sh

index 339dae1..1fc08a5 100644 (file)
@@ -4588,7 +4588,7 @@ test_124a() {
 
         # we want to sleep 30s to not make test too long
         SLEEP=30
-        SLEEP_ADD=10
+        SLEEP_ADD=2
 
         # we know that lru resize allows one client to hold $LIMIT locks for 10h
         MAX_HRS=10
@@ -4596,15 +4596,16 @@ test_124a() {
         # get the pool limit
         LIMIT=`cat $NSDIR/pool/limit`
 
-        # calculate lock volume factor taking into account sleep and data set
-        # use $LRU_SIZE_B here to take into account real number of locks created
+        # calculate lock volume factor taking into account data set size and the
+        # rule that number of locks will be getting smaller durring sleep interval
+        # and we need to additionally enforce LVF to take this into account.
+        # Use $LRU_SIZE_B here to take into account real number of locks created
         # in the case of CMD, LRU_SIZE_B != $NR in most of cases
-        LVF=$(($LIMIT * $MAX_HRS * 60 * 60 / $LRU_SIZE_B / $SLEEP))
-
+        LVF=$(($LRU_SIZE_B * $MAX_HRS * 60 * 60))
         log "make client drop locks $LVF times faster so that ${SLEEP}s is enough to cancel $LRU_SIZE_B lock(s)"
         OLD_LVF=`cat $NSDIR/pool/lock_volume_factor`
         echo "$LVF" > $NSDIR/pool/lock_volume_factor
-        log "sleep for "$((SLEEP+SLEEP_ADD))"s"
+        log "sleep for $((SLEEP+SLEEP_ADD))s"
         sleep $((SLEEP+SLEEP_ADD))
         echo "$OLD_LVF" > $NSDIR/pool/lock_volume_factor
         LRU_SIZE_A=`cat $NSDIR/lru_size`