4 # The upper dentry may become stale before we remove it from
5 # overlay, e.g. file was removed from upperdir directly, which
6 # triggered warning/oops in ovl_remove_and_whiteout().
8 # Commit cfc9fde0b07c ("ovl: verify upper dentry in
9 # ovl_remove_and_whiteout()") fixed this issue.
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2016 Red Hat Inc. All Rights Reserved.
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation.
18 # This program is distributed in the hope that it would be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write the Free Software Foundation,
25 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #-----------------------------------------------------------------------
30 seqres=$RESULT_DIR/$seq
31 echo "QA output created by $seq"
35 status=1 # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
44 # get standard environment, filters and checks
50 # real QA test starts here
55 # remove all files from previous runs
58 lowerdir=$SCRATCH_DEV/$OVL_LOWER
59 upperdir=$SCRATCH_DEV/$OVL_UPPER
60 mkdir -p $lowerdir/test
64 # remove test file to create a whiteout
65 rmdir $SCRATCH_MNT/test
67 # create the test file again and remove it from upperdir directly, make the
68 # upper dentry become stale
69 touch $SCRATCH_MNT/test
71 # try to remove test file from overlay dir, trigger ovl_remove_and_whiteout, it
72 # should see stale file handle error, and no warnings/oops are expected.
73 rm $SCRATCH_MNT/test 2>&1 | _filter_scratch