X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-quota.sh;h=a56c221f40a71129cbc9ec5eb82ea6242e8b8e47;hb=7661294557774975dbd7aa90014f4ab1610db7df;hp=c018bd08b8c0ae20fb4c0d6a6cb7442fb1c2e95b;hpb=7c7c6bf5380f38b069f634d2d95e5c756e4eea0b;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index c018bd0..a56c221 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -2050,6 +2050,54 @@ test_27() { } run_test_with_stat 27 "lfs quota/setquota should handle wrong arguments (19612) =================" +test_28() { + BLK_LIMIT=$((100 * 1024 * 1024)) # 100G + echo "Step 1: set enough high limit for user [$TSTUSR:$BLK_LIMIT]" + $LFS setquota -u $TSTUSR -b 0 -B $BLK_LIMIT -i 0 -I 0 $DIR + $SHOW_QUOTA_USER + + echo "Step 2: reset system ..." + cleanup_and_setup_lustre + test_0 + + echo "Step 3: change qunit for user [$TSTUSR:512:1024]" + set_blk_tunesz 512 + set_blk_unitsz 1024 + + wait_delete_completed + + #define OBD_FAIL_QUOTA_RET_QDATA | OBD_FAIL_ONCE + lustre_fail ost 0x80000A02 + + TESTFILE="$DIR/$tdir/$tfile" + mkdir -p $DIR/$tdir + + BLK_LIMIT=$((100 * 1024)) # 100M + echo "Step 4: set enough high limit for user [$TSTUSR:$BLK_LIMIT]" + $LFS setquota -u $TSTUSR -b 0 -B $BLK_LIMIT -i 0 -I 0 $DIR + $SHOW_QUOTA_USER + + touch $TESTFILE + chown $TSTUSR.$TSTUSR $TESTFILE + + echo "Step 5: write the test file1 [10M] ..." + $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(( 10 * 1024 )) \ + || quota_error a $TSTUSR "write 10M file failure" + $SHOW_QUOTA_USER + + rm -f $TESTFILE + sync; sleep 3; sync; + + # make qd_count 64 bit + lustre_fail ost 0 + + set_blk_unitsz $((128 * 1024)) + set_blk_tunesz $((128 * 1024 / 2)) + + resetquota -u $TSTUSR +} +run_test_with_stat 28 "test for consistency for qunit when setquota (18574) ===========" + # turn off quota quota_fini() {