summaryrefslogtreecommitdiff
path: root/tests/generic/319
blob: 0efb46bed71752b095b97222144b5d2b14c03541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2013 Filipe Manana.  All Rights Reserved.
#
# FS QA Test No. generic/319
#
# Regression test to make sure a directory inherits the default ACL from
# its parent directory. This test was motivated by an issue reported by
# a btrfs user. That issue is fixed and described by the following btrfs
# kernel patch:
#
#     https://patchwork.kernel.org/patch/3046931/
#
. ./common/preamble
_begin_fstest acl auto quick perms

# Import common functions.
. ./common/filter
. ./common/attr

# real QA test starts here
_supported_fs generic
_require_acls
_require_scratch

_scratch_mkfs > /dev/null 2>&1
_scratch_mount

mkdir $SCRATCH_MNT/testdir
setfacl -d --set u::rwx,g::rwx,o::- $SCRATCH_MNT/testdir
getfacl -n --absolute-names $SCRATCH_MNT/testdir | _filter_scratch

mkdir $SCRATCH_MNT/testdir/testsubdir
getfacl -n --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch

# success, all done
status=0
exit