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 seqres=$RESULT_DIR/$seq
18 echo "QA output created by $seq"
22 status=0 # success is the default!
23 trap "_cleanup; exit \$status" 0 1 2 3 15
29 rm -rf $SCRATCH_MNT/$seq
32 # get standard environment, filters and checks
36 # real QA test starts here
39 _require_xfs_mkfs_ciname
42 _scratch_mkfs -n version=ci >/dev/null 2>&1
45 status=1 # default failure
46 sourcefile=$tmp.ci_nametest
49 # need to create an input file with a list of filenames on each line
50 # do number of files for testing to try each directory format
52 # start with small number of files and increase by 4x for each run
56 mkdir $SCRATCH_MNT/$seq
57 while [ $num_files -le $max_files ]; do
58 iterations=`expr $num_files \* 10`
59 $here/src/genhashnames $SCRATCH_MNT/$seq/$num_files $num_files $seed >>$sourcefile
60 mkdir $SCRATCH_MNT/$seq/$num_files
61 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z -c
62 num_files=`expr $num_files \* 4`