4 # Test out acl/dacls which fit in shortform in the inode
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
26 seqres=$RESULT_DIR/$seq
27 seqres=$RESULT_DIR/$seq
28 seqres=$RESULT_DIR/$seq
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
50 # set up fs for 1K inodes
52 _scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
53 [ $? -eq 0 ] && source $tmp.mkfs
54 if [ "$isize" -lt 1024 ]; then
55 _scratch_mkfs_xfs -i size=1024 >>$here/$seqres.full \
56 || _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
58 _scratch_mount >>$here/$seqres.full || _fail "mount failed"
59 xfs_info $SCRATCH_MNT >>$here/$seqres.full
63 echo "=== Test out large ACLs ==="
67 # John Trostel reported probs with going from 20 to 21 aces
68 # 20 ace ACL = 20*12+4 = 244 bytes
69 # 21 ace ACL = 21*12+4 = 256 bytes - too big for shortform
70 # the 21 ace ACL can not be shortform
72 acl20=`_create_n_aces 20`
73 acl21=`_create_n_aces 21`
75 echo "try 20 aces for access acl"
76 chacl $acl20 largeacldir
77 getfacl --numeric largeacldir | _filter_aces
79 echo "try 20 aces for default acl"
80 chacl -d $acl20 largeacldir
81 getfacl --numeric largeacldir | _filter_aces
83 echo "try 21 aces for access acl"
84 chacl $acl21 largeacldir
85 getfacl --numeric largeacldir | _filter_aces
87 echo "try 21 aces for default acl"
88 chacl -d $acl21 largeacldir
89 getfacl --numeric largeacldir | _filter_aces