mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Split out xfs & generic quota existence tests
Make a new test to test for generic quota tools, for generic filesystem testing. Move the existing quota test to a new "xfs" name. Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Reviewed-by: Lachlan McIlroy <lmcilroy@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -55,7 +55,7 @@ cp /dev/null $seq.full
|
||||
chmod a+rwx $seq.full # arbitrary users will write here
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
bsoft=100
|
||||
bhard=500
|
||||
|
||||
@@ -54,7 +54,7 @@ _supported_os IRIX Linux
|
||||
rm -f $seq.full
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
_require_nobody
|
||||
|
||||
# setup a default run
|
||||
|
||||
@@ -52,7 +52,7 @@ cp /dev/null $seq.full
|
||||
chmod ugo+rwx $seq.full
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
_filter_stat()
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
# prelim
|
||||
rm -f $seq.full $tmp.*
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
_require_v2log
|
||||
|
||||
echo "*** init FS"
|
||||
|
||||
@@ -42,7 +42,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
_supported_fs xfs
|
||||
_supported_os Linux #IRIX
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
_require_prjquota
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
@@ -54,7 +54,7 @@ s/Inode: \#\d+ \(\d+ blocks, \d+ extents\)/Inode: #[INO] (X blocks, Y extents)/;
|
||||
_supported_fs xfs
|
||||
_supported_os Linux #IRIX
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
_require_prjquota
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
@@ -49,7 +49,7 @@ s,$SCRATCH_DEV,[SCR_DEV],;
|
||||
_supported_fs xfs
|
||||
_supported_os Linux #IRIX
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
_require_prjquota
|
||||
|
||||
test_files()
|
||||
|
||||
@@ -51,7 +51,7 @@ _supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
mkfs.xfs -f $SCRATCH_DEV >/dev/null 2>&1
|
||||
mount -o uquota $SCRATCH_DEV $SCRATCH_MNT
|
||||
|
||||
@@ -52,7 +52,7 @@ _supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
_chowning_file()
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ _cleanup()
|
||||
_supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
dir=$SCRATCH_MNT/project
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ _supported_fs xfs
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch
|
||||
_require_quota
|
||||
_require_xfs_quota
|
||||
|
||||
#
|
||||
# Setup temporary replacements for /etc/projects and /etc/projid
|
||||
|
||||
+15
-2
@@ -21,14 +21,27 @@
|
||||
#
|
||||
|
||||
#
|
||||
# checks that the XFS quota support in the kernel is enabled
|
||||
# checks that the generic quota support in the kernel is enabled
|
||||
# and that we have valid quota user tools installed.
|
||||
#
|
||||
_require_quota()
|
||||
{
|
||||
[ -x /usr/bin/quota ] || _notrun "Quota user tools not installed"
|
||||
_scratch_mount "-o usrquota,grpquota"
|
||||
ret=$?
|
||||
umount $SCRATCH_MNT
|
||||
[ $ret -ne 0 ] && _notrun "Installed kernel does not support quota"
|
||||
}
|
||||
|
||||
#
|
||||
# checks that the XFS quota support in the kernel is enabled
|
||||
# and that we have valid quota user tools installed.
|
||||
#
|
||||
_require_xfs_quota()
|
||||
{
|
||||
src/feature -q $TEST_DEV
|
||||
[ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
|
||||
[ -x /usr/sbin/xfs_quota ] || _notrun "Quota user tools not installed"
|
||||
[ -x /usr/sbin/xfs_quota ] || _notrun "XFS quota user tools not installed"
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user