fstests: move test group info to test files
[xfstests-dev.git] / tests / generic / 364
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 364
6 #
7 # RichACL basic test
8 #
9 . ./common/preamble
10 _begin_fstest auto quick richacl
11
12 # Import common functions.
13 . ./common/attr
14
15 # real QA test starts here
16
17 _supported_fs generic
18
19 _require_scratch
20 _require_scratch_richacl
21 _require_richacl_prog
22
23 _scratch_mkfs_richacl >> $seqres.full
24 _scratch_mount
25
26 cd $SCRATCH_MNT
27
28 umask 022
29
30 touch x
31
32 $SETRICHACL_PROG --set 'everyone@:rwp::allow' x
33 stat -c %A x
34 $GETRICHACL_PROG x
35
36 chmod 664 x
37 stat -c %A x
38 $GETRICHACL_PROG x
39
40 # Note that unlike how the test cases look at first sight, we do *not* require
41 # a richacl-enabled version of ls here ...
42
43 mkdir sub
44 $SETRICHACL_PROG --set 'everyone@:rwpxd:fd:allow' sub
45 stat -c %A+ sub
46 _getfattr -m system\.richacl sub
47
48 chmod 775 sub
49 stat -c %A+ sub
50 _getfattr -m system\.richacl sub
51 $GETRICHACL_PROG sub
52
53 touch sub/f
54 stat -c %A sub/f
55 $GETRICHACL_PROG sub/f
56
57 mkdir sub/sub2
58 stat -c %A+ sub/sub2
59 $GETRICHACL_PROG sub/sub2
60
61 mkdir -m 750 sub/sub3
62 stat -c %A+ sub/sub3
63 $GETRICHACL_PROG sub/sub3
64
65 # success, all done
66 status=0
67 exit