xfs/144: Use _qsetup instead of qsetup
[xfstests-dev.git] / tests / overlay / 023
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Red Hat Inc.  All Rights Reserved.
4 #
5 # FS QA Test 023
6 #
7 # The "work" directory in an overlyfs workdir should not inherit
8 # ACL attrs from workdir.
9 # Kernel commits below fix it.
10 #   c11b9fdd6a61 ovl: remove posix_acl_default from workdir
11 #   e1ff3dd1ae52 ovl: fix workdir creation
12 #
13 # This reproducer was originally written by
14 #     Miklos Szeredi <mszeredi@redhat.com>
15 #
16 seq=`basename $0`
17 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
19
20 here=`pwd`
21 tmp=/tmp/$$
22 status=1        # failure is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
24
25 _cleanup()
26 {
27         cd /
28         rm -f $tmp.*
29 }
30
31 # get standard environment, filters and checks
32 . ./common/rc
33 . ./common/filter
34 . ./common/attr
35
36 # remove previous $seqres.full before test
37 rm -f $seqres.full
38
39 # real QA test starts here
40
41 # Modify as appropriate.
42 _supported_fs overlay
43 _require_acls
44 _require_scratch
45
46 # Remove all files from previous tests
47 _scratch_mkfs
48
49 # setting acls before mount
50 wkdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
51 mkdir -p $wkdir
52 setfacl -d -m o::rwx $wkdir
53
54 _scratch_mount
55
56 # getting acls, ACL set on workdir should be cleaned
57 getfacl -n -p $wkdir/work 2>&1 | _filter_scratch | _filter_ovl_dirs
58
59 # success, all done
60 status=0
61 exit