From 31a0adf1ff0e3748a7e60ba0eb908e59e8730015 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 17 Sep 2008 22:09:56 +0000 Subject: [PATCH] b=15521 i=Adilger force test_127 to fail if no read|write bytes eq 0 --- lustre/tests/sanity.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 1212bb2..4ab40df 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5211,9 +5211,10 @@ test_127() { # bug 15521 $LCTL get_param osc.*0000-osc-*.stats | grep samples > $DIR/${tfile}.tmp while read NAME COUNT SAMP UNIT MIN MAX SUM SUMSQ; do - eval $NAME=$COUNT echo "got $COUNT $NAME" - + [ ! $MIN ] && error "Missing min value for $NAME proc entry" + eval $NAME=$COUNT || error "Wrong proc format" + case $NAME in read_bytes|write_bytes) [ $MIN -lt 4096 ] && error "min is too small: $MIN" @@ -5231,8 +5232,10 @@ test_127() { # bug 15521 done < $DIR/${tfile}.tmp #check that we actually got some stats - [ "$read_bytes" ] || error "no read done" - [ "$write_bytes" ] || error "no write done" + [ "$read_bytes" ] || error "Missing read_bytes stats" + [ "$write_bytes" ] || error "Missing write_bytes stats" + [ "$read_bytes" = 0 ] && error "no read done" + [ "$write_bytes" = 0 ] && error "no write done" } run_test 127 "verify the client stats are sane" -- 1.8.3.1