common: kill _supported_os
[xfstests-dev.git] / tests / xfs / 067
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 067
6 #
7 # Test out acl/dacls which fit in shortform in the inode
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
17
18 # get standard environment, filters and checks
19 . ./common/rc
20 . ./common/filter
21 . ./common/attr
22
23 # real QA test starts here
24 _supported_fs xfs
25
26 _require_attrs
27 _require_acls
28 _require_scratch
29
30 # set up fs for 1K inodes
31 isize=0
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"
37 fi
38 _scratch_mount
39 $XFS_INFO_PROG $SCRATCH_MNT >>$seqres.full
40 cd $SCRATCH_MNT
41
42 echo ""
43 echo "=== Test out large ACLs  ==="
44
45 mkdir largeacldir
46
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
51 #
52 acl20=`_create_n_aces 20`
53 acl21=`_create_n_aces 21`
54
55 echo "try 20 aces for access acl"
56 chacl $acl20 largeacldir
57 getfacl --numeric largeacldir | _filter_aces
58
59 echo "try 20 aces for default acl"
60 chacl -d $acl20 largeacldir
61 getfacl --numeric largeacldir | _filter_aces
62
63 echo "try 21 aces for access acl"
64 chacl $acl21 largeacldir
65 getfacl --numeric largeacldir | _filter_aces
66
67 echo "try 21 aces for default acl"
68 chacl -d $acl21 largeacldir
69 getfacl --numeric largeacldir | _filter_aces
70
71 # success, all done
72 status=0
73 exit