2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Red Hat Inc. All Rights Reserved.
7 # Overlayfs failed to get posix acls if lower or upper
9 # Kernel commit below fixed it.
10 # 5201dc449e4b ovl: use cached acl on underlying layer
12 # This reproducer was originally written by
13 # Miklos Szeredi <mszeredi@redhat.com>
16 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
27 $UMOUNT_PROG $tmpfsdir/mnt
28 $UMOUNT_PROG $tmpfsdir
33 # get standard environment, filters and checks
37 # remove previous $seqres.full before test
40 # real QA test starts here
42 # Modify as appropriate.
45 _require_extra_fs tmpfs
47 # create a tmpfs in $TEST_DIR
48 tmpfsdir=$TEST_DIR/tmpfs
50 $MOUNT_PROG -t tmpfs tmpfs $tmpfsdir
52 mkdir -p $tmpfsdir/{lower,upper,work,mnt}
53 mkdir -p -m 0 $tmpfsdir/upper/testd
54 # grant permission for $qa_user
55 setfacl -m u:$qa_user:rx $tmpfsdir/upper/testd
57 # mount overlay using dirs in tmpfs
58 _overlay_mount_dirs $tmpfsdir/{lower,upper,work,overlay,mnt}
60 # user accessing test dir, should be OKay
61 _user_do "ls $tmpfsdir/mnt/testd"
63 echo "Silence is golden"