2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat Inc., All Rights Reserved.
7 # Test visible whiteout issue after renaming file from lowerdir to a dir in
10 # Upstream commit 45d117389696 ("ovl: ignore lower entries when checking purity
11 # of non-directory entries") fixed the issue
14 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
28 # get standard environment, filters and checks
34 # real QA test starts here
38 echo "Silence is golden"
40 # Remove all files from previous tests
43 # Create test file/dir before mount
44 mkdir -p $OVL_BASE_SCRATCH_MNT/$OVL_LOWER
45 mkdir -p $OVL_BASE_SCRATCH_MNT/$OVL_UPPER
46 touch $OVL_BASE_SCRATCH_MNT/$OVL_LOWER/lowertestfile
47 mkdir $OVL_BASE_SCRATCH_MNT/$OVL_UPPER/uppertestdir
51 # rename lowertestfile to uppertestdir, this triggers copyup and creates
52 # whiteout in $OVL_UPPER
53 mv $SCRATCH_MNT/lowertestfile $SCRATCH_MNT/uppertestdir
54 # the lowertestfile can be removed
55 rm $SCRATCH_MNT/uppertestdir/lowertestfile
56 # no file no whiteout file in upptestdir
57 ls $SCRATCH_MNT/uppertestdir