xfs: modify quota tests to work on generic filesystems
authorEric Sandeen <sandeen@sandeen.net>
Thu, 22 Sep 2016 18:54:16 +0000 (13:54 -0500)
committerEryu Guan <eguan@redhat.com>
Fri, 23 Sep 2016 02:04:57 +0000 (10:04 +0800)
commitee25b89d8c26b11aab95adbb3bc69d350d184f47
treeb485ab705088be4be766ed86485fd33499f7bff2
parentbda2cdea400d67c4717b3f56fdabfe505d007e17
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>
common/quota
tests/xfs/054
tests/xfs/118
tests/xfs/138
tests/xfs/260
tests/xfs/260.out