mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Provide generic function for checking quota usage
Provide generic function _check_quota_usage for checking whether quota usage matches the space used and use it in proper tests. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
committed by
Christoph Hellwig
parent
37b7b5a9e1
commit
176002236e
@@ -50,18 +50,6 @@ s,$SCRATCH_DEV,[SCR_DEV],;
|
||||
print;"
|
||||
}
|
||||
|
||||
check_usage()
|
||||
{
|
||||
quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
|
||||
repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
|
||||
sort >$tmp.orig
|
||||
quotacheck -u -g $SCRATCH_MNT 2>/dev/null
|
||||
repquota -u -g -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch |
|
||||
sort >$tmp.checked
|
||||
quotaon -u -g $SCRATCH_MNT 2>/dev/null
|
||||
diff $tmp.orig $tmp.checked
|
||||
}
|
||||
|
||||
_filter_num()
|
||||
{
|
||||
tee -a $here/$seq.full |\
|
||||
@@ -113,7 +101,7 @@ if ! _fsstress; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! check_usage; then
|
||||
if ! _check_quota_usage; then
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
status=1
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user