fix compiler warnings
[xfstests-dev.git] / 007
1 #! /bin/sh
2 # FS 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 #
13 # creator
14 owner=tes@sgi.com
15
16 seq=`basename $0`
17 echo "QA output created by $seq"
18
19 here=`pwd`
20 tmp=/tmp/$$
21 status=0        # success is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
23
24 _cleanup()
25 {
26     cd /
27     rm -f $tmp.*
28     rm -rf $testdir/$seq
29     _cleanup_testdir
30 }
31
32 # get standard environment, filters and checks
33 . ./common.rc
34 . ./common.filter
35
36 # real QA test starts here
37 _supported_fs xfs udf nfs
38 _supported_os IRIX Linux
39
40 _setup_testdir
41
42 status=1 # default failure 
43 sourcefile=$tmp.nametest
44 seed=1
45 iterations=100000
46 num_filenames=100
47
48 # need to create an input file with a list of
49 # filenames on each line 
50 i=1
51 while [ $i -le $num_filenames ]; do
52   echo "nametest.$i" >>$sourcefile
53   i=`expr $i + 1`
54 done
55
56 mkdir $testdir/$seq
57 cd $testdir/$seq
58 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
59
60 # success, all done
61 status=0
62 exit