Added rizzo1 to known host list
[xfstests-dev.git] / 113
1 #! /bin/sh
2 # FS QA Test No. 113
3 #
4 # aio-stress
5 #
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=nathans@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=0        # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     cd /
24     rm -f $testdir/aio-stress.$$.*
25     _cleanup_testdir
26 }
27
28 # get standard environment, filters and checks
29 . ./common.rc
30 . ./common.filter
31
32 _do_test()
33 {
34     _n="$1"
35     _param="$2"
36     _count="$3"
37     _nproc="$4"
38
39     _files="$testdir/aiostress.$$.$_n"
40     __proc=$_nproc
41     [ $__proc -gt 1 ] && _param="-t $__proc $_param"
42     while [ $__proc -gt 1 ]; do
43         _files="$_files $testdir/aiostress.$$.$_n.$__proc"
44         __proc=`expr $__proc - 1`
45     done
46     rm -f $_files
47  
48     echo ""
49     echo "-----------------------------------------------"
50     echo "aio-stress.$_n : $_param"
51     echo "-----------------------------------------------"
52     if ! $here/ltp/aio-stress $_param $AIOSTRESS_AVOID -I $_count $_files >>$tmp.out 2>&1
53     then
54         echo "    aio-stress (count=$_count) returned $?"
55         cat $tmp.out
56         status=1
57         exit
58     fi
59
60     _check_test_fs
61     rm -f $_files
62 }
63
64
65 # real QA test starts here
66 _supported_os Linux
67
68 [ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform"
69
70 _setup_testdir
71
72 echo "brevity is wit..."
73
74 count=1000
75 procs=20
76
77 _check_test_fs
78
79 # the default
80 _do_test 1 "-s 120m" $count 1
81
82 # and the default with multiprocess
83 _do_test 2 "-s 10m" $count $procs
84
85 # as above, but now using direct IO
86 _do_test 3 "-s 10m -O" $count $procs
87
88 exit