4 # Test rename for various sizes of directories. This is motivated by a bug
5 # in XFS where directory entry file type was not updated properly on rename.
7 #-----------------------------------------------------------------------
8 # Copyright (C) 2015 SUSE Linux Products GmbH. All Rights Reserved.
9 # Author: Jan Kara <jack@suse.com>
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #-----------------------------------------------------------------------
27 seqres=$RESULT_DIR/$seq
28 echo "QA output created by $seq"
32 status=1 # failure is the default!
33 trap "_cleanup; exit \$status" 0 1 2 3 15
41 # get standard environment, filters and checks
44 # real QA test starts here
51 echo "Silence is golden"
55 for (( i = 0; i < $1; i++ )); do
60 # Test renaming of file, symlink over file, symlink, non-existent
84 _scratch_mkfs >> $seqres.full 2>&1
85 _scratch_mount >> $seqres.full 2>&1
87 # Test different directory sizes to test various directory formats
88 for f in 1 2 3 4 5 8 12 18 27 40 60 90 135 202 303 454 681 1020 1530 2295; do
89 mkdir $SCRATCH_MNT/dir$f
90 pushd $SCRATCH_MNT/dir$f >/dev/null