xfstests: remove stale machine configs
[xfstests-dev.git] / 011
1 #! /bin/bash
2 # FS QA Test No. 011
3 #
4 # dirstress
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
12 #
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21 #
22 #-----------------------------------------------------------------------
23 #
24
25 seq=`basename $0`
26 echo "QA output created by $seq"
27
28 out=""
29 here=`pwd`
30 tmp=/tmp/$$
31 status=0        # success is the default!
32 trap "_cleanup; exit \$status" 0 1 2 3 15
33
34 _cleanup()
35 {
36     cd /
37     rm -f $tmp.*
38     [ -n "$out" ] && rm -rf $out
39     _cleanup_testdir
40 }
41
42 # get standard environment, filters and checks
43 . ./common.rc
44 . ./common.filter
45
46 # real QA test starts here
47 _supported_fs generic
48 _supported_os IRIX Linux
49
50 _setup_testdir
51
52 out=$testdir/dirstress.$$
53
54 rm -f $seq.full
55
56 _test()
57 {
58     test="$1"
59     args="$2"
60     count="$3"
61     
62     echo "*** TEST $test $args -f <count>"
63     if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1
64     then
65         echo "    dirstress failed"
66         echo "*** TEST $test -d $out -f $count $args" >>$seq.full
67         cat $tmp.out >>$seq.full
68         status=1
69     fi
70 }
71
72 # dirstress doesn't check returns - this is a crash & burn test.
73 if ! mkdir $out
74 then
75     echo "!! couldn't mkdir $out"
76     status=1
77     exit
78 fi
79
80 count=1000
81 _test 1 "-p 1 -n 1" $count
82 _test 2 "-p 5 -n 1" $count
83 _test 3 "-p 5 -n 5" $count
84
85 # if error
86 exit