xfs/{263,106}: erase max warnings printout
[xfstests-dev.git] / tests / overlay / 025
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 025
6 #
7 # Overlayfs failed to get posix acls if lower or upper
8 # fs is tmpfs.
9 # Kernel commit below fixed it.
10 # 5201dc449e4b ovl: use cached acl on underlying layer
11 #
12 # This reproducer was originally written by
13 #     Miklos Szeredi <mszeredi@redhat.com>
14 #
15 seq=`basename $0`
16 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
18
19 here=`pwd`
20 tmp=/tmp/$$
21 status=1        # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
23
24 _cleanup()
25 {
26         cd /
27         $UMOUNT_PROG $tmpfsdir/mnt
28         $UMOUNT_PROG $tmpfsdir
29         rm -rf $tmpfsdir
30         rm -f $tmp.*
31 }
32
33 # get standard environment, filters and checks
34 . ./common/rc
35 . ./common/filter
36
37 # remove previous $seqres.full before test
38 rm -f $seqres.full
39
40 # real QA test starts here
41
42 # Modify as appropriate.
43 _supported_fs overlay
44 _supported_os Linux
45 _require_user
46 _require_tmpfs
47
48 # create a tmpfs in $TEST_DIR
49 tmpfsdir=$TEST_DIR/tmpfs
50 mkdir -p $tmpfsdir
51 $MOUNT_PROG -t tmpfs tmpfs $tmpfsdir
52
53 mkdir -p $tmpfsdir/{lower,upper,work,mnt}
54 mkdir -p -m 0 $tmpfsdir/upper/testd
55 # grant permission for $qa_user
56 setfacl -m u:$qa_user:rx $tmpfsdir/upper/testd
57
58 # mount overlay using dirs in tmpfs
59 _overlay_mount_dirs $tmpfsdir/{lower,upper,work,overlay,mnt}
60
61 # user accessing test dir, should be OKay
62 _user_do "ls $tmpfsdir/mnt/testd"
63
64 echo "Silence is golden"
65 # success, all done
66 status=0
67 exit