Whamcloud - gitweb
LU-7317 tests: Called the error function where it was missing.
[fs/lustre-release.git] / lustre / tests / sanity-quota.sh
index 76305d7..3cd052c 100755 (executable)
@@ -402,7 +402,7 @@ test_1() {
        trap cleanup_quota_test EXIT
 
        # enable ost quota
-       set_ost_qtype "ug" || "enable ost quota failed"
+       set_ost_qtype "ug" || error "enable ost quota failed"
 
        # test for user
        log "User quota (block hardlimit:$LIMIT MB)"
@@ -487,7 +487,7 @@ test_2() {
        trap cleanup_quota_test EXIT
 
        # enable mdt quota
-       set_mdt_qtype "ug" || "enable mdt quota failed"
+       set_mdt_qtype "ug" || error "enable mdt quota failed"
 
        # test for user
        log "User quota (inode hardlimit:$LIMIT files)"
@@ -1223,7 +1223,7 @@ test_7e() {
        $RUNAS createmany -m $TESTFILE $((ilimit + 1)) &&
                quota_error u $TSTUSR "create succeeded, expect EDQUOT"
 
-       $RUNAS unlinkmany $TESTFILE $ilimit || "unlink files failed"
+       $RUNAS unlinkmany $TESTFILE $ilimit || error "unlink files failed"
        wait_delete_completed
        sync_all_data || true
 
@@ -1243,8 +1243,8 @@ test_7e() {
        $RUNAS createmany -m $TESTFILE $((ilimit + 1)) ||
                quota_error -u $TSTUSR "create failed, expect success"
 
-       $RUNAS unlinkmany $TESTFILE $((ilimit + 1)) || "unlink failed"
-       rmdir $DIR/${tdir}-1 || "unlink remote dir failed"
+       $RUNAS unlinkmany $TESTFILE $((ilimit + 1)) || error "unlink failed"
+       rmdir $DIR/${tdir}-1 || error "unlink remote dir failed"
 
        cleanup_quota_test
        resetquota -u $TSTUSR
@@ -1357,7 +1357,7 @@ test_10() {
                error "set limit for root group successfully, expect failure"
 
        # root user can overrun quota
-       set_ost_qtype "ug" || "enable ost quota failed"
+       set_ost_qtype "ug" || error "enable ost quota failed"
 
        $LFS setquota -u $TSTUSR -b 0 -B 2M -i 0 -I 0 $DIR ||
                error "set quota failed"
@@ -1379,7 +1379,7 @@ test_11() {
        setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
 
-       set_mdt_qtype "ug" || "enable mdt quota failed"
+       set_mdt_qtype "ug" || error "enable mdt quota failed"
        $LFS setquota -u $TSTUSR -b 0 -B 0 -i 0 -I 1 $DIR ||
                error "set quota failed"
 
@@ -1409,7 +1409,7 @@ test_12a() {
        setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
 
-       set_ost_qtype "u" || "enable ost quota failed"
+       set_ost_qtype "u" || error "enable ost quota failed"
        quota_show_check b u $TSTUSR
 
        $LFS setquota -u $TSTUSR -b 0 -B "$blimit"M -i 0 -I 0 $DIR ||
@@ -1455,7 +1455,7 @@ test_12b() {
        $LFS mkdir -i 1 $DIR/${tdir}-1 || error "create remote dir failed"
        chmod 0777 $DIR/${tdir}-1
 
-       set_mdt_qtype "u" || "enable mdt quota failed"
+       set_mdt_qtype "u" || error "enable mdt quota failed"
        quota_show_check f u $TSTUSR
 
        $LFS setquota -u $TSTUSR -b 0 -B 0 -i 0 -I $ilimit $DIR ||
@@ -1495,7 +1495,7 @@ test_13(){
        setup_quota_test || error "setup quota failed with $?"
        trap cleanup_quota_test EXIT
 
-       set_ost_qtype "u" || "enable ost quota failed"
+       set_ost_qtype "u" || error "enable ost quota failed"
        quota_show_check b u $TSTUSR
 
        $LFS setquota -u $TSTUSR -b 0 -B 10M -i 0 -I 0 $DIR ||