From: hongchao.zhang Date: Sun, 3 Apr 2011 07:28:09 +0000 (+0800) Subject: LU-213 using direct io for quota test to avoid cache problem X-Git-Tag: 2.0.61.0~10 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=0cf909130f76284ecada44c4671cedeb318f3d89 LU-213 using direct io for quota test to avoid cache problem in test_14a of sanity-qutota.sh, the data written was cached in client side, which causes the test failed, using "mulitop ${TESTFILE} oO_DIRECT" (direct IO) instead of "dd" to avoid such issue. Change-Id: I0802c2ea200483c148e4e7f61e2c6d4b34500f01 Signed-off-by: Hongchao Zhang Reviewed-on: http://review.whamcloud.com/435 Tested-by: Hudson Reviewed-by: Yu Jian Reviewed-by: Johann Lombardi --- diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 4dfd603..f749443 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1194,10 +1194,10 @@ test_14a() { # was test_14 b=12223 -- setting quota on root $LFS setquota -u root -b 10 -B 10 -i 10 -I 10 $DIR createmany -m ${TESTFILE} 20 || \ quota_error u root "unexpected: user(root) create files failly!" - dd if=/dev/zero of=$TESTFILE bs=4k count=4096 || \ + multiop ${TESTFILE} oO_CREAT:O_WRONLY:O_DIRECT:w$((4096 * 4096))c || \ quota_error u root "unexpected: user(root) write files failly!" chmod 666 $TESTFILE - $RUNAS dd if=/dev/zero of=${TESTFILE} seek=4096 bs=4k count=4096 && \ + $RUNAS multiop ${TESTFILE} oO_WRONLY:O_APPEND:O_DIRECT:w$((4096 * 4096))c && \ quota_error u root "unexpected: user(quota_usr) write a file successfully!" # trigger the llog