3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #-----------------------------------------------------------------------
23 # Test out acl/dacls which fit in shortform in the inode
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
34 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
36 # get standard environment, filters and checks
41 # real QA test starts here
45 [ -x /usr/bin/chacl ] || _notrun "chacl executable not found"
51 # set up fs for 1K inodes
53 _scratch_mkfs_xfs | _filter_mkfs >$seq.full 2>$tmp.mkfs
54 [ $? -eq 0 ] && source $tmp.mkfs
55 if [ "$isize" -lt 1024 ]; then
56 _scratch_mkfs_xfs -i size=1024 >>$here/$seq.full \
57 || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
59 _scratch_mount >>$here/$seq.full || _fail "mount failed"
60 xfs_info $SCRATCH_MNT >>$here/$seq.full
64 echo "=== Test out large ACLs ==="
68 # John Trostel reported probs with going from 20 to 21 aces
69 # 20 ace ACL = 20*12+4 = 244 bytes
70 # 21 ace ACL = 21*12+4 = 256 bytes - too big for shortform
71 # the 21 ace ACL can not be shortform
73 acl20=`_create_n_aces 20`
74 acl21=`_create_n_aces 21`
76 echo "try 20 aces for access acl"
77 chacl $acl20 largeacldir
78 getfacl largeacldir | _filter_aces
80 echo "try 20 aces for default acl"
81 chacl -d $acl20 largeacldir
82 getfacl largeacldir | _filter_aces
84 echo "try 21 aces for access acl"
85 chacl $acl21 largeacldir
86 getfacl largeacldir | _filter_aces
88 echo "try 21 aces for default acl"
89 chacl -d $acl21 largeacldir
90 getfacl largeacldir | _filter_aces