From: grev Date: Thu, 19 Feb 2009 22:15:31 +0000 (+0000) Subject: b=18521 X-Git-Tag: v1_8_0_110~245 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=ba2450cb6534e41cdbb25e0bb36b8871064fa6d5;p=fs%2Flustre-release.git b=18521 i=Alex.Zhuravlev sanity test_151, t-f localize var fix --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 6c9d04a..d6cac5a 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 ===============================" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 2fcc3c1..a1d3ca2 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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