Whamcloud - gitweb
LU-18293 test: use direct IO for quota test 33/58533/3
authorHongchao Zhang <hongchao@whamcloud.com>
Tue, 18 Mar 2025 08:40:02 +0000 (16:40 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Apr 2025 06:59:10 +0000 (06:59 +0000)
In subtest 1b, 1c, 1d, the quota test should use DD with direct flag
to make sure the over-quota check is correct.

Test-Parameters: trivial testlist=sanity-quota env=ONLY=1,ONLY_REPEAT=100
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Ief327fb56fdd2e5911e5f57256d5ec683e5edf8e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58533
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 da1e539..2472933 100755 (executable)
@@ -566,12 +566,13 @@ test_1_check_write() {
        local short_qtype=${qtype:0:1}
 
        log "Write..."
-       $RUNAS $DD of=$testfile count=$((limit/2)) ||
+       $RUNAS $DD of=$testfile count=$((limit/2)) oflag=direct ||
                quota_error $short_qtype $TSTUSR \
                        "$qtype write failure, but expect success"
        log "Write out of block quota ..."
        # this time maybe cache write, ignore it's failure
-       $RUNAS $DD of=$testfile count=$((limit/2)) seek=$((limit/2)) || true
+       $RUNAS $DD of=$testfile count=$((limit/2)) seek=$((limit/2)) \
+                                               oflag=direct || true
        # flush cache, ensure noquota flag is set on client
        cancel_lru_locks osc
        sync; sync_all_data || true
@@ -579,7 +580,7 @@ test_1_check_write() {
        # guarantee that slave received new edquot through glimpse.
        # so wait a little to be sure slave got it.
        sleep 5
-       $RUNAS $DD of=$testfile count=1 seek=$limit &&
+       $RUNAS $DD of=$testfile count=1 seek=$limit oflag=direct &&
                quota_error $short_qtype $TSTUSR \
                        "user write success, but expect EDQUOT"
        return 0