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

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

index 61d799e..d661aca 100644 (file)
@@ -3666,10 +3666,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
@@ -5898,23 +5898,23 @@ test_151() {
        $LCTL set_param -n 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
@@ -5922,7 +5922,7 @@ test_151() {
        fi
 
        $LCTL set_param -n obdfilter.*.read_cache_enable 1
-        rm -f $DIR/$tfile
+       rm -f $DIR/$tfile
 }
 run_test 151 "test cache on oss and controls ==============================="
 
index 26e7f79..88dadb1 100644 (file)
@@ -1957,7 +1957,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