tests: remove udf/101
[xfstests-dev.git] / tests / generic / 362
1 #! /bin/bash
2 # FS QA Test 362
3 #
4 # RichACL apply-masks test
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2016 Red Hat, Inc.  All Rights Reserved.
8 #
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.
12 #
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.
17 #
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
21 #-----------------------------------------------------------------------
22 #
23
24 seq=`basename $0`
25 seqres=$RESULT_DIR/$seq
26 echo "QA output created by $seq"
27
28 here=`pwd`
29 tmp=/tmp/$$
30 status=1        # failure is the default!
31 trap "_cleanup; exit \$status" 0 1 2 3 15
32
33 _cleanup()
34 {
35         cd /
36         rm -f $tmp.*
37 }
38
39 # get standard environment, filters and checks
40 . ./common/rc
41
42 # remove previous $seqres.full before test
43 rm -f $seqres.full
44
45 # real QA test starts here
46
47 _supported_fs generic
48 _supported_os Linux
49
50 _require_scratch
51 _require_scratch_richacl
52 _require_richacl_prog
53
54 _scratch_mkfs_richacl >> $seqres.full
55 _scratch_mount
56
57 cd $SCRATCH_MNT
58
59 touch x
60 $SETRICHACL_PROG --set 'owner@:rwp::allow group@:rwp::allow everyone@:r::allow' x
61 $GETRICHACL_PROG x
62
63 $SETRICHACL_PROG --set 'everyone@:wp::allow owner@:r::allow group@:r::allow' x
64 chmod 664 x
65 $GETRICHACL_PROG x
66
67 $SETRICHACL_PROG --set 'everyone@:wp::deny owner@:rwp::allow group@:rwp::allow' x
68 chmod 664 x
69 $GETRICHACL_PROG x
70
71 $SETRICHACL_PROG --set 'owner@:rwCo::allow' x
72 $GETRICHACL_PROG x
73
74 $SETRICHACL_PROG --set 'owner@:rwpCo::allow' x
75 $GETRICHACL_PROG x
76
77 chmod 644 x
78 $GETRICHACL_PROG x
79
80 $SETRICHACL_PROG --set 'u:77:rwp::allow' x
81 chmod 664 x
82 $GETRICHACL_PROG x
83
84 chmod 644 x
85 $GETRICHACL_PROG --numeric-ids x
86
87 chmod 664 x
88 $GETRICHACL_PROG x
89
90 $SETRICHACL_PROG --set 'u:77:rwp::allow everyone@:r::allow' x
91 chmod 664 x
92 $GETRICHACL_PROG x
93
94 $SETRICHACL_PROG --set 'u:77:r::allow everyone@:rwp::allow' x
95 chmod 664 x
96 $GETRICHACL_PROG x
97
98 $SETRICHACL_PROG --set 'u:77:wp::deny everyone@:rwp::allow' x
99 chmod 664 x
100 $GETRICHACL_PROG x
101
102 $SETRICHACL_PROG --set 'u:77:rwp::allow u:77:wp::deny everyone@:rwp::allow' x
103 chmod 664 x
104 $GETRICHACL_PROG x
105
106 $SETRICHACL_PROG --set 'everyone@:rwp::allow' x
107 chmod 066 x
108 $GETRICHACL_PROG x
109
110 chmod 006 x
111 $GETRICHACL_PROG x
112
113 chmod 606 x
114 $GETRICHACL_PROG x
115
116 $SETRICHACL_PROG --set 'u:77:rwp::allow everyone@:rwp::allow' x
117 chmod 606 x
118 $GETRICHACL_PROG x
119
120 chmod 646 x
121 $GETRICHACL_PROG x
122
123 # success, all done
124 status=0
125 exit