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
38 _require_xfs_quota_foreign
40 # need user and group named 123456-fsgqa
41 _require_user 123456-fsgqa
42 _require_group 123456-fsgqa
44 _scratch_mkfs >/dev/null 2>&1
45 _qmount_option "usrquota,grpquota"
49 echo "== user test =="
50 $XFS_QUOTA_PROG -x -c "limit -u bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
51 echo "=== quota command output ==="
52 $XFS_QUOTA_PROG -c "quota -u -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
53 echo "=== report command output ==="
54 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota
57 echo "== group test =="
58 $XFS_QUOTA_PROG -x -c "limit -g bsoft=100m bhard=200m 123456-fsgqa" $SCRATCH_MNT
59 echo "=== quota command output ==="
60 $XFS_QUOTA_PROG -c "quota -g -b -N -v 123456-fsgqa" $SCRATCH_MNT | _filter_quota
61 echo "=== report command output ==="
62 $XFS_QUOTA_PROG -x -c "report -u -b -N" $SCRATCH_MNT | grep -v "^root " | _filter_quota