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 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
31 # remove previous $seqres.full before test
34 # real QA test starts here
39 _require_xfs_quota_foreign
41 # need user and group named 123456-fsgqa
42 _require_user 123456-fsgqa
43 _require_group 123456-fsgqa
45 _scratch_mkfs >/dev/null 2>&1
46 _qmount_option "usrquota,grpquota"
50 echo "== user test =="
51 $XFS_QUOTA_PROG -x -c "limit -u bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
52 echo "=== quota command output ==="
53 $XFS_QUOTA_PROG -c "quota -u -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
54 echo "=== report command output ==="
55 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota
58 echo "== group test =="
59 $XFS_QUOTA_PROG -x -c "limit -g bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
60 echo "=== quota command output ==="
61 $XFS_QUOTA_PROG -c "quota -g -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
62 echo "=== report command output ==="
63 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota