From: Andreas Dilger Date: Fri, 14 Oct 2022 22:04:53 +0000 (-0600) Subject: EX-5909 tests: clean up in sanity-quota/16a X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=96deed703b55307b49d4124beaa90958079d00f3;p=fs%2Flustre-release.git EX-5909 tests: clean up in sanity-quota/16a Clean up the test file in sanity-quota test_16a. If test_16b is run (DNE config) then the filesystem is reformatted, but in the non-DNE config test_17 will fail if there is used quota. Test-Parameters: trivial testlist=sanity-quota Fixes: b54b7ce43929 ("LU-14472 quota: skip non-exist or inact tgt for lfs_quota") Signed-off-by: Andreas Dilger Change-Id: Id1faeab9df246d8010bf114582ab17a75846db68 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/48899 Reviewed-by: Jian Yu Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 9897736..491ea0e 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -2534,11 +2534,16 @@ test_16a() setup_quota_test || error "setup quota failed with $?" + # make sure the system is clean + local used=$(getquota -u $TSTUSR global curspace) + [[ "$used" == "0" ]] || error "Used space($used) for user $TSTUSR not 0" + $LFS setquota -u $TSTUSR -B 500M -I 10K $MOUNT || error "failed to set quota for user $TSTUSR" $LFS setquota -g $TSTUSR -B 500M -I 10K $MOUNT || error "failed to set quota for group $TSTUSR" + stack_trap "rm -f $DIR/$tdir/$tfile" $RUNAS $DD of=$DIR/$tdir/$tfile bs=1M count=50 || quota_error u $TSTUSR "write failure"