Whamcloud - gitweb
b=18521
authorgrev <grev>
Thu, 19 Feb 2009 22:15:31 +0000 (22:15 +0000)
committergrev <grev>
Thu, 19 Feb 2009 22:15:31 +0000 (22:15 +0000)
i=Alex.Zhuravlev
sanity test_151, t-f localize var fix

lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index 6c9d04a..d6cac5a 100644 (file)
@@ -3545,10 +3545,10 @@ run_test 79 "df report consistency check ======================="
 test_80() { # bug 10718
         dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
         sync; sleep 1; sync
-        BEFORE=`date +%s`
+        local BEFORE=`date +%s`
         cancel_lru_locks osc
-        AFTER=`date +%s`
-        DIFF=$((AFTER-BEFORE))
+        local AFTER=`date +%s`
+        local DIFF=$((AFTER-BEFORE))
         if [ $DIFF -gt 1 ] ; then
                 error "elapsed for 1M@1T = $DIFF"
         fi
@@ -5636,23 +5636,23 @@ test_151() {
        $LCTL set_param obdfilter.*.writethrough_cache_enable=1
 
        # pages should be in the case right after write
-        dd if=/dev/urandom of=$DIR/$tfile bs=4k count=$CPAGES||error "dd failed"
-       BEFORE=`roc_hit`
-        cancel_lru_locks osc
+       dd if=/dev/urandom of=$DIR/$tfile bs=4k count=$CPAGES || error "dd failed"
+       local BEFORE=`roc_hit`
+       cancel_lru_locks osc
        cat $DIR/$tfile >/dev/null
-       AFTER=`roc_hit`
+       local AFTER=`roc_hit`
        if let "AFTER - BEFORE != CPAGES"; then
                error "NOT IN CACHE: before: $BEFORE, after: $AFTER"
        fi
 
        # the following read invalidates the cache
-        cancel_lru_locks osc
+       cancel_lru_locks osc
        $LCTL set_param -n obdfilter.*.read_cache_enable 0
        cat $DIR/$tfile >/dev/null
 
        # now data shouldn't be found in the cache
        BEFORE=`roc_hit`
-        cancel_lru_locks osc
+       cancel_lru_locks osc
        cat $DIR/$tfile >/dev/null
        AFTER=`roc_hit`
        if let "AFTER - BEFORE != 0"; then
@@ -5661,7 +5661,7 @@ test_151() {
 
        $LCTL set_param -n obdfilter.*.read_cache_enable=1
        $LCTL set_param obdfilter.*.writethrough_cache_enable=1
-        rm -f $DIR/$tfile
+       rm -f $DIR/$tfile
 }
 run_test 151 "test cache on oss and controls ==============================="
 
index 2fcc3c1..a1d3ca2 100644 (file)
@@ -1705,7 +1705,7 @@ run_one() {
     local SAVE_UMASK=`umask`
     umask 0022
 
-    BEFORE=`date +%s`
+    local BEFORE=`date +%s`
     log "== test $testnum: $message ============ `date +%H:%M:%S` ($BEFORE)"
     #check_mds
     export TESTNAME=test_$testnum