Whamcloud - gitweb
b=10825
[fs/lustre-release.git] / lustre / tests / sanity-quota.sh
index ab43295..d548db4 100644 (file)
@@ -17,7 +17,7 @@ SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-""}
+ALWAYS_EXCEPT="$SANITY_QUOTA_EXCEPT"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 case `uname -r` in
@@ -668,8 +668,8 @@ test_9() {
         set_blk_tunesz $((1024 * 50))
 
         # set the D_QUOTA flag
-       DBG_SAVE="`sysctl -n lnet.debug`"
-       sysctl -w lnet.debug="$DBG_SAVE quota"
+       debugsave
+       sysctl -w lnet.debug="+quota"
 
         TESTFILE="$TSTDIR/quota_tst90"
 
@@ -711,7 +711,7 @@ test_9() {
         set_blk_tunesz $BTUNE_SZ
         set_blk_unitsz $BUNIT_SZ
 
-       sysctl -w lnet.debug="$DBG_SAVE"
+       debugrestore
         return $RC
 }
 run_test 9 "run for fixing bug10707(64bit) ==========="
@@ -737,12 +737,9 @@ test_10() {
        set_blk_tunesz $((1024 * 50))
 
        # set the D_QUOTA flag
-       set_flag=0
-       if [ -z "`sysctl lnet.debug | grep quota`" ]; then
-               sysctl -w lnet.debug="+quota"
-               set_flag=1
-       fi
-
+       debugsave
+       sysctl -w lnet.debug="+quota"
+       
        # make qd_count 32 bit
        sysctl -w lustre.fail_loc=0xA00
 
@@ -785,9 +782,7 @@ test_10() {
        RC=$?
 
        # clear the flage
-       if [ $set_flag -eq 1 ]; then
-               sysctl -w lnet.debug="-quota"
-       fi
+       debugrestore
 
        # make qd_count 64 bit
        sysctl -w lustre.fail_loc=0