Skip to content
Snippets Groups Projects
Commit d9188dd4 authored by tianzy's avatar tianzy
Browse files

Branch b1_6

fix the statistics output of sanity-quota.sh
b=14909
i=adilger
i=grev
parent 4f23635b
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,7 @@ run_test_with_stat() { ...@@ -147,7 +147,7 @@ run_test_with_stat() {
do_facet ost$j "lctl set_param lquota.${FSNAME}-OST*.stats=0" > /dev/null do_facet ost$j "lctl set_param lquota.${FSNAME}-OST*.stats=0" > /dev/null
done done
run_test "$@" run_test "$@"
if [ ${STAT:-"yes"} != "no" ]; then if [ ${STAT:-"yes"} != "no" -a -z "$LAST_SKIPPED" ]; then
echo "statistics info begin ***************************************" echo "statistics info begin ***************************************"
do_facet mds "lctl get_param lquota.${FSNAME}-MDT*.stats" do_facet mds "lctl get_param lquota.${FSNAME}-MDT*.stats"
for j in `seq $OSTCOUNT`; do for j in `seq $OSTCOUNT`; do
......
...@@ -1313,6 +1313,8 @@ basetest() { ...@@ -1313,6 +1313,8 @@ basetest() {
IFS=abcdefghijklmnopqrstuvwxyz _basetest $1 IFS=abcdefghijklmnopqrstuvwxyz _basetest $1
} }
# print a newline if the last test was skipped
export LAST_SKIPPED=
run_test() { run_test() {
assert_DIR assert_DIR
...@@ -1320,38 +1322,46 @@ run_test() { ...@@ -1320,38 +1322,46 @@ run_test() {
if [ ! -z "$ONLY" ]; then if [ ! -z "$ONLY" ]; then
testname=ONLY_$1 testname=ONLY_$1
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
[ "$LAST_SKIPPED" ] && echo "" && LAST_SKIPPED=
run_one $1 "$2" run_one $1 "$2"
return $? return $?
fi fi
testname=ONLY_$base testname=ONLY_$base
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
[ "$LAST_SKIPPED" ] && echo "" && LAST_SKIPPED=
run_one $1 "$2" run_one $1 "$2"
return $? return $?
fi fi
LAST_SKIPPED="y"
echo -n "." echo -n "."
return 0 return 0
fi fi
testname=EXCEPT_$1 testname=EXCEPT_$1
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
LAST_SKIPPED="y"
TESTNAME=test_$1 skip "skipping excluded test $1" TESTNAME=test_$1 skip "skipping excluded test $1"
return 0 return 0
fi fi
testname=EXCEPT_$base testname=EXCEPT_$base
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
LAST_SKIPPED="y"
TESTNAME=test_$1 skip "skipping excluded test $1 (base $base)" TESTNAME=test_$1 skip "skipping excluded test $1 (base $base)"
return 0 return 0
fi fi
testname=EXCEPT_SLOW_$1 testname=EXCEPT_SLOW_$1
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
LAST_SKIPPED="y"
TESTNAME=test_$1 skip "skipping SLOW test $1" TESTNAME=test_$1 skip "skipping SLOW test $1"
return 0 return 0
fi fi
testname=EXCEPT_SLOW_$base testname=EXCEPT_SLOW_$base
if [ ${!testname}x != x ]; then if [ ${!testname}x != x ]; then
LAST_SKIPPED="y"
TESTNAME=test_$1 skip "skipping SLOW test $1 (base $base)" TESTNAME=test_$1 skip "skipping SLOW test $1 (base $base)"
return 0 return 0
fi fi
LAST_SKIPPED=
run_one $1 "$2" run_one $1 "$2"
return $? return $?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment