xfs/{263,106}: erase max warnings printout
[xfstests-dev.git] / tests / overlay / 024
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 024
6 #
7 # "work" directory under workdir should be cleaned up
8 # well on overlayfs startup, or overlayfs will be mounted
9 # read-only.
10 # Kernel commit below fixes it.
11 # eea2fb4851e9 ovl: proper cleanup of workdir
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
35 # remove previous $seqres.full before test
36 rm -f $seqres.full
37
38 # real QA test starts here
39
40 # Modify as appropriate.
41 _supported_fs overlay
42 _supported_os Linux
43 _require_scratch
44
45 # Remove all files from previous tests
46 _scratch_mkfs
47
48 # making workdir
49 wkdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
50 mkdir -p $wkdir/work/foo
51
52 _scratch_mount
53
54 # try writing to mountpoint
55 touch $SCRATCH_MNT/bar
56
57 # checking work dir is clean
58 if [ -e $wkdir/work/foo ] ; then
59         echo "work dir is not clean"
60 else
61         echo "Silence is golden"
62 fi
63 # success, all done
64 status=0
65 exit