whoops, typoe in test output file
[xfstests-dev.git] / 007
1 #! /bin/sh
2 # XFS QA Test No. 007
3 #
4 # drive the src/nametest program
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 #-----------------------------------------------------------------------
10 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
11
12 # This program is free software; you can redistribute it and/or modify it
13 # under the terms of version 2 of the GNU General Public License as
14 # published by the Free Software Foundation.
15
16 # This program is distributed in the hope that it would be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20 # Further, this software is distributed without any warranty that it is
21 # free of the rightful claim of any third person regarding infringement
22 # or the like.  Any license provided herein, whether implied or
23 # otherwise, applies only to this software file.  Patent licenses, if
24 # any, provided herein do not apply to combinations of this program with
25 # other software, or any other product whatsoever.
26
27 # You should have received a copy of the GNU General Public License along
28 # with this program; if not, write the Free Software Foundation, Inc., 59
29 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
30
31 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
32 # Mountain View, CA  94043, or:
33
34 # http://www.sgi.com 
35
36 # For further information regarding this notice, see: 
37
38 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
39 #-----------------------------------------------------------------------
40 #
41 # creator
42 owner=tes@sgi.com
43
44 seq=`basename $0`
45 echo "QA output created by $seq"
46
47 here=`pwd`
48 tmp=/tmp/$$
49 status=0        # success is the default!
50 trap "_cleanup; exit \$status" 0 1 2 3 15
51
52 _cleanup()
53 {
54     rm -f $tmp.*
55     rm -rf $TEST_DIR/$seq
56 }
57
58 # get standard environment, filters and checks
59 . ./common.rc
60 . ./common.filter
61
62 # real QA test starts here
63 status=1 # default failure 
64 sourcefile=$tmp.nametest
65 seed=1
66 iterations=100000
67 num_filenames=100
68
69 # need to create an input file with a list of
70 # filenames on each line 
71 i=1
72 while [ $i -le $num_filenames ]; do
73   echo "nametest.$i" >>$sourcefile
74   i=`expr $i + 1`
75 done
76
77 mkdir $TEST_DIR/$seq
78 cd $TEST_DIR/$seq
79 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
80
81
82 #optional stuff if your test has verbose output to help resolve problems
83 #echo
84 #echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"
85
86
87 # success, all done
88 status=0
89 exit