QA tests for filestreams
[xfstests-dev.git] / 171
1 #! /bin/sh
2 # FSQA Test No. 171
3 #
4 # Check the filestreams allocator is doing its job.
5 # Multi-file data streams should always write into seperate AGs.
6 #
7 #-----------------------------------------------------------------------
8 #  Copyright (c) 2007 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=dgc@sgi.com
13
14 seq=`basename $0`
15 echo "QA output created by $seq"
16
17 here=`pwd`
18 tmp=/tmp/$$
19 status=1    # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
21
22 _cleanup()
23 {
24         cd /
25         rm -rf ${SCRATCH_MNT}/stream*
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 xfs
34 _supported_os IRIX Linux
35
36 _require_scratch
37
38 . ./common.filestreams
39
40 # test large numbers of files, single I/O per file, 120s timeout
41 # Get close to filesystem full.
42 # 128 = ENOSPC
43 # 120 = 93.75% full, gets repeatable failures
44 # 112 = 87.5% full, should reliably succeed but doesn't *FIXME*
45 # 100 = 78.1% full, should reliably succeed
46 echo 12000 > /proc/sys/fs/xfs/filestream_centisecs
47 _test_streams 64 16 8 100 1 1 0
48 _test_streams 64 16 8 100 1 1 1
49 _test_streams 64 16 8 100 1 0 0
50 _test_streams 64 16 8 100 1 0 1
51
52 status=0
53 exit
54