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 _begin_fstest acl attr auto quick
12 # Import common functions.
16 # real QA test starts here
23 # set up fs for 1K inodes
25 _scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
26 [ $? -eq 0 ] && source $tmp.mkfs
27 if [ "$isize" -lt 1024 ]; then
28 _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
29 || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
32 $XFS_INFO_PROG $SCRATCH_MNT >>$seqres.full
36 echo "=== Test out large ACLs ==="
40 # John Trostel reported probs with going from 20 to 21 aces
41 # 20 ace ACL = 20*12+4 = 244 bytes
42 # 21 ace ACL = 21*12+4 = 256 bytes - too big for shortform
43 # the 21 ace ACL can not be shortform
45 acl20=`_create_n_aces 20`
46 acl21=`_create_n_aces 21`
48 echo "try 20 aces for access acl"
49 chacl $acl20 largeacldir
50 getfacl --numeric largeacldir | _filter_aces
52 echo "try 20 aces for default acl"
53 chacl -d $acl20 largeacldir
54 getfacl --numeric largeacldir | _filter_aces
56 echo "try 21 aces for access acl"
57 chacl $acl21 largeacldir
58 getfacl --numeric largeacldir | _filter_aces
60 echo "try 21 aces for default acl"
61 chacl -d $acl21 largeacldir
62 getfacl --numeric largeacldir | _filter_aces