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
30 # set up fs for 1K inodes
32 _scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
33 [ $? -eq 0 ] && source $tmp.mkfs
34 if [ "$isize" -lt 1024 ]; then
35 _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
36 || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
39 $XFS_INFO_PROG $SCRATCH_MNT >>$seqres.full
43 echo "=== Test out large ACLs ==="
47 # John Trostel reported probs with going from 20 to 21 aces
48 # 20 ace ACL = 20*12+4 = 244 bytes
49 # 21 ace ACL = 21*12+4 = 256 bytes - too big for shortform
50 # the 21 ace ACL can not be shortform
52 acl20=`_create_n_aces 20`
53 acl21=`_create_n_aces 21`
55 echo "try 20 aces for access acl"
56 chacl $acl20 largeacldir
57 getfacl --numeric largeacldir | _filter_aces
59 echo "try 20 aces for default acl"
60 chacl -d $acl20 largeacldir
61 getfacl --numeric largeacldir | _filter_aces
63 echo "try 21 aces for access acl"
64 chacl $acl21 largeacldir
65 getfacl --numeric largeacldir | _filter_aces
67 echo "try 21 aces for default acl"
68 chacl -d $acl21 largeacldir
69 getfacl --numeric largeacldir | _filter_aces