2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
7 # drive the src/nametest program for CI mode
8 # which does a heap of open(create)/unlink/stat
9 # and checks that error codes make sense with its
10 # memory of the files created.
12 # All filenames generated map to the same hash
13 # value in XFS stressing leaf block traversal in
14 # node form directories as well.
17 _begin_fstest ci dir auto
19 status=0 # success is the default!
21 # Override the default cleanup function.
26 rm -rf $SCRATCH_MNT/$seq
29 # Import common functions.
32 # real QA test starts here
35 _require_xfs_mkfs_ciname
37 _scratch_mkfs -n version=ci >/dev/null 2>&1
40 sourcefile=$tmp.ci_nametest
43 # need to create an input file with a list of filenames on each line
44 # do number of files for testing to try each directory format
46 # start with small number of files and increase by 4x for each run
50 mkdir $SCRATCH_MNT/$seq
51 while [ $num_files -le $max_files ]; do
52 iterations=`expr $num_files \* 10`
53 $here/src/genhashnames $SCRATCH_MNT/$seq/$num_files $num_files $seed >>$sourcefile
54 mkdir $SCRATCH_MNT/$seq/$num_files
55 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z -c
56 num_files=`expr $num_files \* 4`