2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
7 # Test xfs_quota when user or names beginning with digits.
8 # For example, create a 'limit' for a user or group named
9 # '12345678-abcd', then query this user and group.
12 _begin_fstest auto quick quota
14 # Import common functions.
18 # real QA test starts here
22 _require_xfs_quota_foreign
24 # need user and group named 123456-fsgqa
25 _require_user 123456-fsgqa
26 _require_group 123456-fsgqa
28 _scratch_mkfs >/dev/null 2>&1
29 _qmount_option "usrquota,grpquota"
33 echo "== user test =="
34 $XFS_QUOTA_PROG -x -c "limit -u bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
35 echo "=== quota command output ==="
36 $XFS_QUOTA_PROG -c "quota -u -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
37 echo "=== report command output ==="
38 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota
41 echo "== group test =="
42 $XFS_QUOTA_PROG -x -c "limit -g bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
43 echo "=== quota command output ==="
44 $XFS_QUOTA_PROG -c "quota -g -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
45 echo "=== report command output ==="
46 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota