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