mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: modify quota tests to work on generic filesystems
Fix several xfs quota tests to work on non-xfs filesystems. New _require function to be sure that the xfs_quota tool can operate on foreign filesystems; if it can, and if it needs to, it adds "-f" to the XFS_QUOTA_PROG variable. Modify _qmount to do quotacheck/quotaon to mount and /enable/ quota. On xfs this isn't needed and/or fails; it's ignored. All quota-related options used as arguments to _qmount are changed from i.e. uquota to i.e. usrquota; the latter is standard across almost all linux filesytems, including xfs. xfs/260 filters out the root/default quota line, because ext4 consumes a different amount of space than xfs, and it's not what we're testing for, so just ignore it. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
+5
-4
@@ -47,11 +47,12 @@ _cleanup()
|
||||
# real QA test starts here
|
||||
|
||||
# Modify as appropriate.
|
||||
_supported_fs xfs
|
||||
_supported_fs generic
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_xfs_quota
|
||||
_require_quota
|
||||
_require_xfs_quota_foreign
|
||||
|
||||
_chowning_file()
|
||||
{
|
||||
@@ -72,10 +73,10 @@ _chowning_file()
|
||||
}
|
||||
|
||||
echo "mkfs on scratch"
|
||||
_scratch_mkfs_xfs >$seqres.full
|
||||
_scratch_mkfs >$seqres.full 2>&1
|
||||
|
||||
echo "mount with quotas"
|
||||
export MOUNT_OPTIONS="-o uquota"
|
||||
export MOUNT_OPTIONS="-o usrquota"
|
||||
_scratch_mount
|
||||
|
||||
echo "creating quota file with holes"
|
||||
|
||||
Reference in New Issue
Block a user