f7f0dd27392bbe17f3c203d6cddcb777b3b69e2a
[xfstests-dev.git] / tests / xfs / 170
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 #
6 # FSQA Test No. 170
7 #
8 # Check the filestreams allocator is doing its job.
9 # Multi-file data streams should always write into seperate AGs.
10 #
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 rm -f $seqres.full
18 status=1    # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23         cd /
24         rm -f $tmp.*
25 }
26
27 # get standard environment, filters and checks
28 . ./common/rc
29 . ./common/filter
30 . ./common/filestreams
31
32 # real QA test starts here
33 _supported_fs xfs
34
35 _require_scratch
36 _require_no_rtinherit
37
38 _check_filestreams_support || _notrun "filestreams not available"
39
40 # test small stream, multiple I/O per file, 30s timeout
41 _set_stream_timeout_centisecs 3000
42
43 # test streams does a mkfs and mount
44 _test_streams 8 22 4 8 3 0 0
45 _test_streams 8 22 4 8 3 1 0
46 _test_streams 8 22 4 8 3 0 1
47 _test_streams 8 22 4 8 3 1 1
48
49 status=0
50 exit