2 # FS QA Test No. generic/319
4 # Regression test to make sure a directory inherits the default ACL from
5 # its parent directory. This test was motivated by an issue reported by
6 # a btrfs user. That issue is fixed and described by the following btrfs
9 # https://patchwork.kernel.org/patch/3046931/
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2013 Filipe Manana. All Rights Reserved.
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27 #-----------------------------------------------------------------------
31 seqres=$RESULT_DIR/$seq
32 echo "QA output created by $seq"
36 status=1 # FAILure is the default!
43 trap "_cleanup ; exit \$status" 0 1 2 3 15
45 # get standard environment, filters and checks
50 # real QA test starts here
58 _scratch_mkfs > /dev/null 2>&1
61 mkdir $SCRATCH_MNT/testdir
62 setfacl -d --set u::rwx,g::rwx,o::- $SCRATCH_MNT/testdir
63 getfacl --absolute-names $SCRATCH_MNT/testdir | _filter_scratch
65 mkdir $SCRATCH_MNT/testdir/testsubdir
66 getfacl --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch