reflink: fix quota tests to work properly

Fix the reflink quota tests to su to the fsgqa user so that we actually
test enforcement of quotas.  Seems that XFS enforces user quotas even
if root is writing to a user file, whereas everything else lets root
writes through.  Also clean up some of the variable usage and
_require_user.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2017-01-09 12:53:35 -08:00
committed by Eryu Guan
parent 3547db8e84
commit eaa652fbb2
13 changed files with 153 additions and 153 deletions
+14 -14
View File
@@ -1,25 +1,25 @@
QA output created by 328
Format and mount
Create the original files
root -- 0 0 0 4 0 0
fsgqa -- 3072 0 0 3 0 0
root 0 0 0
fsgqa 3072 0 0
Set hard quota to prevent rewrite
root -- 0 0 0 4 0 0
fsgqa +- 3072 0 1024 3 0 0
root 0 0 0
fsgqa 3072 0 1024
Try to dio write the whole file
pwrite: Disk quota exceeded
root -- 0 0 0 4 0 0
fsgqa +- 3072 0 1024 3 0 0
root 0 0 0
fsgqa 3072 0 1024
Try to write the whole file
pwrite: Disk quota exceeded
root -- 0 0 0 4 0 0
fsgqa +- 3072 0 1024 3 0 0
root 0 0 0
fsgqa 3072 0 1024
Set hard quota to allow rewrite
root -- 0 0 0 4 0 0
fsgqa -- 3072 0 8192 3 0 0
root 0 0 0
fsgqa 3072 0 8192
Try to dio write the whole file
root -- 0 0 0 4 0 0
fsgqa -- 3072 0 8192 3 0 0
root 0 0 0
fsgqa 3072 0 8192
Try to write the whole file
root -- 0 0 0 4 0 0
fsgqa -- 3072 0 8192 3 0 0
root 0 0 0
fsgqa 3072 0 8192