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 <adilger@whamcloud.com>
Change-Id: Id1faeab9df246d8010bf114582ab17a75846db68
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/48899
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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"