2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
7 # Test out acl/dacls which fit in shortform in the inode
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
23 # real QA test starts here
31 # set up fs for 1K inodes
33 _scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
34 [ $? -eq 0 ] && source $tmp.mkfs
35 if [ "$isize" -lt 1024 ]; then
36 _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
37 || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
40 $XFS_INFO_PROG $SCRATCH_MNT >>$seqres.full
44 echo "=== Test out large ACLs ==="
48 # John Trostel reported probs with going from 20 to 21 aces
49 # 20 ace ACL = 20*12+4 = 244 bytes
50 # 21 ace ACL = 21*12+4 = 256 bytes - too big for shortform
51 # the 21 ace ACL can not be shortform
53 acl20=`_create_n_aces 20`
54 acl21=`_create_n_aces 21`
56 echo "try 20 aces for access acl"
57 chacl $acl20 largeacldir
58 getfacl --numeric largeacldir | _filter_aces
60 echo "try 20 aces for default acl"
61 chacl -d $acl20 largeacldir
62 getfacl --numeric largeacldir | _filter_aces
64 echo "try 21 aces for access acl"
65 chacl $acl21 largeacldir
66 getfacl --numeric largeacldir | _filter_aces
68 echo "try 21 aces for default acl"
69 chacl -d $acl21 largeacldir
70 getfacl --numeric largeacldir | _filter_aces