From: grev Date: Wed, 12 Aug 2009 18:20:33 +0000 (+0000) Subject: b=20371 X-Git-Tag: v1_9_240~8 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=5c5f060b6ee8b26cfef25085a084292be16264aa;p=fs%2Flustre-release.git b=20371 i=Oleg.Drokin i=Alexey.Lyashkov test_151 fix for single node setup --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index bbe8d56..fe3574be 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -6111,19 +6111,13 @@ test_150() { } run_test 150 "truncate/append tests" -function roc_access() { - local list=$(comma_list $(osts_nodes)) - ACCNUM=`do_nodes $list $LCTL get_param -n obdfilter.*.stats | \ - grep 'cache_access'| awk '{print $2}' | \ - awk '{sum=sum+$3} END{print sum}'` - echo $ACCNUM -} - function roc_hit() { local list=$(comma_list $(osts_nodes)) - ACCNUM=`do_nodes $list $LCTL get_param -n obdfilter.*.stats | \ - grep 'cache_hit'|awk '{print $2}' | \ - awk '{sum=sum+$1} END{print sum}'` + local log=$TMP/${TESTSUITE}-$TESTNAME.param + do_nodes $list "$LCTL get_param -n obdfilter.*.stats" >$log + + local ACCNUM=`awk '/^cache_hit/ {sum=sum+$2} END{print sum}' $log` + rm -f $log echo $ACCNUM } diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 60bb0ac..b71e974 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1408,7 +1408,11 @@ do_nodes() { shift if $(single_local_node $rnodes); then - do_node --verbose $rnodes $@ + if $verbose; then + do_node --verbose $rnodes $@ + else + do_node $rnodes $@ + fi return $? fi