91311042f6fabad16066815bd2846bdc07252d37
[xfstests-dev.git] / 174
1 #! /bin/sh
2 #
3 #-----------------------------------------------------------------------
4 # Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
9 #
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 #
19 #-----------------------------------------------------------------------
20 #
21 # FSQA Test No. 174
22 #
23 # Check the filestreams allocator is doing its job.
24 # Multi-file data streams should always write into seperate AGs.
25 #
26 # creator
27 owner=dgc@sgi.com
28
29 seq=`basename $0`
30 echo "QA output created by $seq"
31
32 here=`pwd`
33 tmp=/tmp/$$
34 rm -f $seq.full
35 status=1    # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
37
38 _cleanup()
39 {
40         cd /
41         rm -f $tmp.*
42 }
43
44 # get standard environment, filters and checks
45 . ./common.rc
46 . ./common.filter
47 . ./common.filestreams
48
49 # real QA test starts here
50 _supported_fs xfs
51 _supported_os IRIX Linux
52
53 _require_scratch
54
55 _check_filestreams_support || _notrun "filestreams not available"
56
57 # test number of streams greater than AGs. Expected to fail.
58 _set_stream_timeout_centisecs 6000
59
60 _test_streams 8 32 65 3 1 1 0 fail
61 _test_streams 8 32 65 3 1 0 1 fail
62
63 status=0
64 exit
65