From 2f96622a522924c7b9e26fd2dfdf34eb6227b7a6 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Tue, 18 Mar 2025 16:40:02 +0800 Subject: [PATCH] LU-18293 test: use direct IO for quota test 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 Change-Id: Ief327fb56fdd2e5911e5f57256d5ec683e5edf8e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58533 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Sergey Cheremencev Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index da1e539..2472933 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -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 -- 1.8.3.1