generic: test for file loss after mix of rename, fsync and inode eviction
[xfstests-dev.git] / tests / generic / 319
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Filipe Manana.  All Rights Reserved.
4 #
5 # FS QA Test No. generic/319
6 #
7 # Regression test to make sure a directory inherits the default ACL from
8 # its parent directory. This test was motivated by an issue reported by
9 # a btrfs user. That issue is fixed and described by the following btrfs
10 # kernel patch:
11 #
12 #     https://patchwork.kernel.org/patch/3046931/
13 #
14 . ./common/preamble
15 _begin_fstest acl auto quick
16
17 # Import common functions.
18 . ./common/filter
19 . ./common/attr
20
21 # real QA test starts here
22 _supported_fs generic
23 _require_acls
24 _require_scratch
25
26 _scratch_mkfs > /dev/null 2>&1
27 _scratch_mount
28
29 mkdir $SCRATCH_MNT/testdir
30 setfacl -d --set u::rwx,g::rwx,o::- $SCRATCH_MNT/testdir
31 getfacl -n --absolute-names $SCRATCH_MNT/testdir | _filter_scratch
32
33 mkdir $SCRATCH_MNT/testdir/testsubdir
34 getfacl -n --absolute-names $SCRATCH_MNT/testdir/testsubdir | _filter_scratch
35
36 # success, all done
37 status=0
38 exit