From 6316b42a73f815748b173134e92fb522f1ddc13d Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Fri, 20 Jul 2018 15:45:56 -0400 Subject: [PATCH] LU-11174 quota: use sync io to test quota In test_61 of sanity-quota, the client cache (grant) could affect the quota behavior, using sync io to avoid the effect of it. Test-Parameters: trivial testlist=sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota,sanity-quota Change-Id: I08bc19c5e7ac4f9cb679f96a2299c0be772f0330 Signed-off-by: Hongchao Zhang Reviewed-on: https://review.whamcloud.com/32874 Reviewed-by: Wang Shilong Tested-by: Jenkins Reviewed-by: James Nunez Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/tests/sanity-quota.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index be12530..12ad793 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -3127,7 +3127,7 @@ test_default_quota() { local qdtype="-U" local qs="-b" local qh="-B" - local LIMIT=102400 #100M disk space + local LIMIT=20480 #20M disk space local TESTFILE="$DIR/$tdir/$tfile-0" [ $qtype == "-p" ] && ! is_project_quota_supported && @@ -3189,7 +3189,7 @@ test_default_quota() { log "Test not out of quota" if [ $qpool == "data" ]; then - $RUNAS $DD of=$TESTFILE count=$((LIMIT/2 >> 10)) || + $RUNAS $DD of=$TESTFILE count=$((LIMIT/2 >> 10)) oflag=sync || quota_error $qtype $qid "write failed, expect succeed" else $RUNAS createmany -m $TESTFILE $((LIMIT/2)) || @@ -3204,7 +3204,7 @@ test_default_quota() { cancel_lru_locks mdc sync; sync_all_data || true if [ $qpool == "data" ]; then - $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) && + $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) oflag=sync && quota_error $qtype $qid "write succeed, expect EDQUOT" else $RUNAS createmany -m $TESTFILE $((LIMIT*2)) && @@ -3222,7 +3222,7 @@ test_default_quota() { cancel_lru_locks mdc sync; sync_all_data || true if [ $qpool == "data" ]; then - $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) || + $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) oflag=sync || quota_error $qtype $qid "write failed, expect succeed" else $RUNAS createmany -m $TESTFILE $((LIMIT*2)) || @@ -3239,7 +3239,7 @@ test_default_quota() { cancel_lru_locks mdc sync; sync_all_data || true if [ $qpool == "data" ]; then - $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) && + $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) oflag=sync && quota_error $qtype $qid "write succeed, expect EQUOT" else $RUNAS createmany -m $TESTFILE $((LIMIT*2)) && @@ -3256,7 +3256,7 @@ test_default_quota() { cancel_lru_locks mdc sync; sync_all_data || true if [ $qpool == "data" ]; then - $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) || + $RUNAS $DD of=$TESTFILE count=$((LIMIT*2 >> 10)) oflag=sync || quota_error $qtype $qid "write failed, expect succeed" else $RUNAS createmany -m $TESTFILE $((LIMIT*2)) || -- 1.8.3.1