Whamcloud - gitweb
LU-12969 test: reset quota limits for all test ID/users 56/36756/4
authorWang Shilong <wshilong@ddn.com>
Thu, 14 Nov 2019 06:22:22 +0000 (14:22 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2019 05:58:31 +0000 (05:58 +0000)
It looks current sanity-quota.sh assumed TSTID/TSTID2 mapped
with quota_usr/quota_2usr. However, in a real testing envirment
this might be not true.

In order to make sure we clean up everthing properly, just reset
every IDs, Users, Groups.

Test-parameters: trivial testlist=sanity-quota
Change-Id: I2faf1a6392ce2ee89e2e22ba0a6ec65efea4ade2
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36756
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Gu Zheng <gzheng@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index b091929..bde7155 100755 (executable)
@@ -438,9 +438,13 @@ project_quota_enabled || enable_project_quota
 
 reset_quota_settings() {
        resetquota -u $TSTUSR
+       resetquota -u $TSTID
        resetquota -g $TSTUSR
+       resetquota -g $TSTID
        resetquota -u $TSTUSR2
+       resetquota -u $TSTID2
        resetquota -g $TSTUSR2
+       resetquota -g $TSTID2
        resetquota -p $TSTPRJID
 }
 
@@ -2298,8 +2302,8 @@ test_27b() { # b20200
                $SHOW_QUOTA_PROJID ||
                        error "lfs quota failed with projid argument"
        fi
-       resetquota -u $TSTUSR
-       resetquota -g $TSTUSR
+       resetquota -u $TSTID
+       resetquota -g $TSTID
        resetquota -p $TSTPRJID
        return 0
 }