4 # Test visible whiteout issue after renaming file from lowerdir to a dir in
7 # Upstream commit 45d117389696 ("ovl: ignore lower entries when checking purity
8 # of non-directory entries") fixed the issue
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2016 Red Hat Inc., All Rights Reserved.
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 #-----------------------------------------------------------------------
29 seqres=$RESULT_DIR/$seq
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
35 trap "_cleanup; exit \$status" 0 1 2 3 15
43 # get standard environment, filters and checks
49 # real QA test starts here
54 echo "Silence is golden"
56 # Remove all files from previous tests
59 # Create test file/dir before mount
60 mkdir -p $SCRATCH_DEV/$OVL_LOWER
61 mkdir -p $SCRATCH_DEV/$OVL_UPPER
62 touch $SCRATCH_DEV/$OVL_LOWER/lowertestfile
63 mkdir $SCRATCH_DEV/$OVL_UPPER/uppertestdir
67 # rename lowertestfile to uppertestdir, this triggers copyup and creates
68 # whiteout in $OVL_UPPER
69 mv $SCRATCH_MNT/lowertestfile $SCRATCH_MNT/uppertestdir
70 # the lowertestfile can be removed
71 rm $SCRATCH_MNT/uppertestdir/lowertestfile
72 # no file no whiteout file in upptestdir
73 ls $SCRATCH_MNT/uppertestdir