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