4 # Overlayfs failed to get posix acls if lower or upper
6 # Kernel commit below fixed it.
7 # 5201dc449e4b ovl: use cached acl on underlying layer
9 # This reproducer was originally written by
10 # Miklos Szeredi <mszeredi@redhat.com>
12 #-----------------------------------------------------------------------
13 # Copyright (c) 2017 Red Hat Inc. All Rights Reserved.
15 # This program is free software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License as
17 # published by the Free Software Foundation.
19 # This program is distributed in the hope that it would be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write the Free Software Foundation,
26 # 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!
37 trap "_cleanup; exit \$status" 0 1 2 3 15
42 $UMOUNT_PROG $tmpfsdir/mnt
43 $UMOUNT_PROG $tmpfsdir
48 # get standard environment, filters and checks
52 # remove previous $seqres.full before test
55 # real QA test starts here
57 # Modify as appropriate.
63 # create a tmpfs in $TEST_DIR
64 tmpfsdir=$TEST_DIR/tmpfs
66 $MOUNT_PROG -t tmpfs tmpfs $tmpfsdir
68 mkdir -p $tmpfsdir/{lower,upper,work,mnt}
69 mkdir -p -m 0 $tmpfsdir/upper/testd
70 # grant permission for $qa_user
71 setfacl -m u:$qa_user:rx $tmpfsdir/upper/testd
73 # mount overlay using dirs in tmpfs
74 _overlay_mount_dirs $tmpfsdir/{lower,upper,work,overlay,mnt}
76 # user accessing test dir, should be OKay
77 _user_do "ls $tmpfsdir/mnt/testd"
79 echo "Silence is golden"