Whamcloud - gitweb
LU-16397 test: check quota setting on QSD 33/49533/5
authorHongchao Zhang <hongchao@whamcloud.com>
Fri, 24 Nov 2023 08:33:10 +0000 (16:33 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 Dec 2023 01:44:55 +0000 (01:44 +0000)
In some case, the quota setting at QMT could not be transfered to
QSD in time, which could cause the test to fail.
This patch adds check on QSD after setting the quota limit by LFS.

Test-Parameters: trivial testlist=sanity-quota
Change-Id: Ia999317a36a0f97c1f66726cdc10e9edac3d8a53
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49533
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-quota.sh

index 718a954..183b9b1 100755 (executable)
@@ -1166,9 +1166,11 @@ test_1h() {
        local used=$(getquota -u $TSTUSR global curspace)
        [ $used -ne 0 ] && error "Used space($used) for user $TSTUSR isn't 0."
 
-       $LFS setstripe $testfile -c 1 || error "setstripe $testfile failed"
+       $LFS setstripe $testfile -i 0 -c 1 || error "setstripe $testfile failed"
        chown $TSTUSR.$TSTUSR $testfile || error "chown $testfile failed"
 
+       wait_quota_synced ost1 OST0000 usr $TSTID hardlimit $((limit*1024))
+
        check_write_fallocate $testfile "user" $limit
 
        rm -f $testfile