xfstests: kill useless test owner fields
[xfstests-dev.git] / 188
1 #! /bin/bash
2 # FS QA Test No. 188
3 #
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.
8 #
9 # All filenames generated map to the same hash
10 # value in XFS stressing leaf block traversal in
11 # node form directories as well.
12 #
13 #-----------------------------------------------------------------------
14 # Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
15 #
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.
19 #
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.
24 #
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
28 #
29 #-----------------------------------------------------------------------
30 #
31
32 seq=`basename $0`
33 echo "QA output created by $seq"
34
35 here=`pwd`
36 tmp=/tmp/$$
37 status=0        # success is the default!
38 trap "_cleanup; exit \$status" 0 1 2 3 15
39
40 _cleanup()
41 {
42     cd /
43     rm -f $tmp.*
44     rm -rf $SCRATCH_MNT/$seq
45 }
46
47 # get standard environment, filters and checks
48 . ./common.rc
49 . ./common.filter
50
51 # real QA test starts here
52 _supported_fs xfs
53 _supported_os IRIX Linux
54
55 if [ $XFSPROGS_VERSION -lt 21000 ]; then
56     _notrun "this test requires case-insensitive support"
57 fi
58
59 _require_scratch
60 rm -f $seq.full
61
62 _scratch_mkfs -n version=ci >/dev/null 2>&1
63 _scratch_mount
64
65 status=1 # default failure
66 sourcefile=$tmp.ci_nametest
67 seed=1
68
69 # need to create an input file with a list of filenames on each line
70 # do number of files for testing to try each directory format
71
72 # start with small number of files and increase by 4x for each run
73 max_files=6144
74 num_files=6
75
76 mkdir $SCRATCH_MNT/$seq
77 while [ $num_files -le $max_files ]; do
78   iterations=`expr $num_files \* 10`
79   $here/src/genhashnames $SCRATCH_MNT/$seq/$num_files $num_files $seed >>$sourcefile
80   mkdir $SCRATCH_MNT/$seq/$num_files
81   $here/src/nametest -l $sourcefile -s $seed -i $iterations -z -c
82   num_files=`expr $num_files \* 4`
83 done
84
85 # success, all done
86 status=0
87 exit