2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
7 # Test xfs_quota when project names beginning with digits.
10 _begin_fstest auto quick quota
14 # Import common functions.
18 # real QA test starts here
22 _require_xfs_quota_foreign
24 _scratch_mkfs >/dev/null 2>&1
25 _scratch_enable_pquota
29 local qa_project=123456-project
30 local dir=$SCRATCH_MNT/project
32 mkdir $dir 2>/dev/null
35 cat >$tmp.projects <<EOF
39 cat >$tmp.projid <<EOF
43 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
44 -c "project -s $qa_project" $SCRATCH_MNT > /dev/null
46 # We set & test inodes, because xfs vs ext4 consume differing
47 # amounts of space for an empty dir, but an inode is an inode...
48 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
49 -c "limit -p isoft=100 ihard=200 $qa_project" $SCRATCH_MNT
51 echo "=== quota command output ==="
52 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid \
53 -c "quota -p -v -i $qa_project" $SCRATCH_MNT | _filter_quota
55 echo "=== report command output ==="
56 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
57 -c "report -p -N -i" $SCRATCH_MNT | _filter_project_quota
61 _qmount_option "usrquota,prjquota"
63 _require_prjquota $SCRATCH_DEV