common: kill _supported_os
[xfstests-dev.git] / tests / generic / 007
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 007
6 #
7 # drive the src/nametest program
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.
11 #
12 seq=`basename $0`
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=0        # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     cd /
24     rm -f $tmp.*
25     rm -rf $TEST_DIR/$seq
26 }
27
28 # get standard environment, filters and checks
29 . ./common/rc
30 . ./common/filter
31
32 # real QA test starts here
33 _supported_fs generic
34 _require_test
35
36 status=1 # default failure 
37 sourcefile=$tmp.nametest
38 seed=1
39 iterations=100000
40 num_filenames=100
41
42 # need to create an input file with a list of
43 # filenames on each line 
44 i=1
45 while [ $i -le $num_filenames ]; do
46   echo "nametest.$i" >>$sourcefile
47   let i=$i+1
48 done
49
50 rm -rf $TEST_DIR/$seq
51 mkdir $TEST_DIR/$seq
52 cd $TEST_DIR/$seq
53 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
54
55 # success, all done
56 status=0
57 exit