2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Red Hat Inc. All Rights Reserved.
7 # "work" directory under workdir should be cleaned up
8 # well on overlayfs startup, or overlayfs will be mounted
10 # Kernel commit below fixes it.
11 # eea2fb4851e9 ovl: proper cleanup of workdir
13 # This reproducer was originally written by
14 # Miklos Szeredi <mszeredi@redhat.com>
17 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
22 status=1 # failure is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
31 # get standard environment, filters and checks
35 # remove previous $seqres.full before test
38 # real QA test starts here
40 # Modify as appropriate.
44 # Remove all files from previous tests
48 wkdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
49 mkdir -p $wkdir/work/foo
53 # try writing to mountpoint
54 touch $SCRATCH_MNT/bar
56 # checking work dir is clean
57 if [ -e $wkdir/work/foo ] ; then
58 echo "work dir is not clean"
60 echo "Silence is golden"