From 1ce568a79623aa93c5f78d74658f67ed57603a32 Mon Sep 17 00:00:00 2001 From: grev Date: Thu, 19 Feb 2009 22:14:26 +0000 Subject: [PATCH] b=18521 i=Alex.Zhuravlev sanity test_151, t-f localize var fix --- lustre/tests/sanity.sh | 20 ++++++++++---------- lustre/tests/test-framework.sh | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 61d799e..d661aca 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 ===============================" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 26e7f79..88dadb1 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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 -- 1.8.3.1