From f7de2ffa51e6ef5982c91db7f936108b9b057dc3 Mon Sep 17 00:00:00 2001 From: grev Date: Mon, 24 Aug 2009 11:27:32 +0000 Subject: [PATCH] b=20371 i=Oleg.Drokin i=Alexey.Lyashkov test_151 fix for single node setup --- lustre/tests/sanity.sh | 16 +++++----------- lustre/tests/test-framework.sh | 6 +++++- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 7a96c7a..b789774 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5816,19 +5816,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 6198f17..afeabe4 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1268,7 +1268,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 -- 1.8.3.1