From: Johann Lombardi Date: Tue, 25 Jan 2011 17:07:20 +0000 (+0100) Subject: b=24245 fix SA perf test to support SA disabled by default X-Git-Tag: 1.8.5.54~31 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=efea320d9be84ab5a10aab9a1bdcbba2218234da;p=fs%2Flustre-release.git b=24245 fix SA perf test to support SA disabled by default --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 0daff74..0629f29 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5398,10 +5398,12 @@ test_123a() { # was test 123, statahead(bug 11401) return 0 fi + statahead_max_old=`lctl get_param -n llite.*.statahead_max | head -n 1` + SLOWOK=0 if [ -z "$(grep "processor.*: 1" /proc/cpuinfo)" ]; then log "testing on UP system. Performance may be not as good as expected." - SLOWOK=1 + SLOWOK=1 fi rm -rf $DIR/$tdir @@ -5413,6 +5415,7 @@ test_123a() { # was test 123, statahead(bug 11401) createmany -o $DIR/$tdir/$tfile $j $((i - j)) max=`lctl get_param -n llite.*.statahead_max | head -n 1` + [ $max -eq 0 ] && max=32 lctl set_param -n llite.*.statahead_max 0 lctl get_param llite.*.statahead_max cancel_lru_locks mdc @@ -5449,6 +5452,7 @@ test_123a() { # was test 123, statahead(bug 11401) lctl set_param debug=-1 max=`lctl get_param -n llite.*.statahead_max | head -n 1` + [ $max -eq 0 ] && max=32 lctl set_param -n llite.*.statahead_max 0 lctl get_param llite.*.statahead_max cancel_lru_locks mdc @@ -5491,7 +5495,9 @@ test_123a() { # was test 123, statahead(bug 11401) delta=$((etime - stime)) log "rm -r $DIR/$tdir/: $delta seconds" log "rm done" - lctl get_param -n llite.*.statahead_stats + # restore default value + $LCTL set_param llite.*.statahead_max=$statahead_max_old + $LCTL get_param -n llite.*.statahead_stats } run_test 123a "verify statahead work"