4 # drive the src/nametest program for CI mode
5 # which does a heap of open(create)/unlink/stat
6 # and checks that error codes make sense with its
7 # memory of the files created.
9 # All filenames generated map to the same hash
10 # value in XFS stressing leaf block traversal in
11 # node form directories as well.
13 #-----------------------------------------------------------------------
14 # Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
16 # This program is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU General Public License as
18 # published by the Free Software Foundation.
20 # This program is distributed in the hope that it would be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write the Free Software Foundation,
27 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 #-----------------------------------------------------------------------
35 echo "QA output created by $seq"
39 status=0 # success is the default!
40 trap "_cleanup; exit \$status" 0 1 2 3 15
46 rm -rf $SCRATCH_MNT/$seq
49 # get standard environment, filters and checks
53 # real QA test starts here
55 _supported_os IRIX Linux
57 if [ $XFSPROGS_VERSION -lt 21000 ]; then
58 _notrun "this test requires case-insensitive support"
64 _scratch_mkfs -n version=ci >/dev/null 2>&1
67 status=1 # default failure
68 sourcefile=$tmp.ci_nametest
71 # need to create an input file with a list of filenames on each line
72 # do number of files for testing to try each directory format
74 # start with small number of files and increase by 4x for each run
78 mkdir $SCRATCH_MNT/$seq
79 while [ $num_files -le $max_files ]; do
80 iterations=`expr $num_files \* 10`
81 $here/src/genhashnames $SCRATCH_MNT/$seq/$num_files $num_files $seed >>$sourcefile
82 mkdir $SCRATCH_MNT/$seq/$num_files
83 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z -c
84 num_files=`expr $num_files \* 4`