2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat Inc. All Rights Reserved.
7 # The upper dentry may become stale before we remove it from
8 # overlay, e.g. file was removed from upperdir directly, which
9 # triggered warning/oops in ovl_remove_and_whiteout().
11 # Commit cfc9fde0b07c ("ovl: verify upper dentry in
12 # ovl_remove_and_whiteout()") fixed this issue.
15 seqres=$RESULT_DIR/$seq
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
35 # real QA test starts here
40 # remove all files from previous runs
43 lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
44 upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
45 mkdir -p $lowerdir/test
49 # remove test file to create a whiteout
50 rmdir $SCRATCH_MNT/test
52 # create the test file again and remove it from upperdir directly, make the
53 # upper dentry become stale
54 touch $SCRATCH_MNT/test
56 # try to remove test file from overlay dir, trigger ovl_remove_and_whiteout, it
57 # should see stale file handle error, and no warnings/oops are expected.
58 rm $SCRATCH_MNT/test 2>&1 | _filter_scratch