Add in sheilas config.
[xfstests-dev.git] / 076
1 #! /bin/sh
2 # FS QA Test No. 076
3 #
4 # Test blockdev reads in parallel with filesystem reads/writes
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
8 #  This program is free software; you can redistribute it and/or modify
9 #  it under the terms of the GNU General Public License as published by
10 #  the Free Software Foundation; either version 2 of the License, or
11 #  (at your option) any later version.
12 #
13 #  This program is distributed in the hope that it will be useful,
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #  GNU General Public License for more details.
17 #
18 #  You should have received a copy of the GNU General Public License
19 #  along with this program; if not, write to the Free Software
20 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
21 #  USA
22 #
23 #  Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
24 #  Mountain View, CA 94043, USA, or: http://www.sgi.com
25 #-----------------------------------------------------------------------
26 #
27 # creator
28 owner=nathans@sgi.com
29
30 seq=`basename $0`
31 echo "QA output created by $seq"
32
33 here=`pwd`
34 tmp=/tmp/$$
35 status=1
36
37 _lets_get_pidst()
38 {
39         if [ -n "$pid" ]; then
40                 kill -TERM $pid 2>/dev/null
41                 pid=""
42                 wait 2>/dev/null
43         fi
44 }
45
46 _cleanup()
47 {
48         echo "*** unmount"
49         umount $SCRATCH_MNT 2>/dev/null
50         _lets_get_pidst
51 }
52 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
53
54 # get standard environment, filters and checks
55 . ./common.rc
56 . ./common.filter
57
58 # real QA test starts here
59 _supported_fs xfs udf
60 _supported_os IRIX Linux
61
62 _require_scratch
63
64 echo "*** init fs"
65
66 rm -f $seq.full
67 umount $SCRATCH_DEV >/dev/null 2>&1
68 echo "*** MKFS ***"                         >>$seq.full
69 echo ""                                     >>$seq.full
70 _scratch_mkfs                               >>$seq.full 2>&1 \
71         || _fail "mkfs failed"
72 _scratch_mount                              >>$seq.full 2>&1 \
73         || _fail "mount failed"
74
75 echo "*** test concurrent block/fs access"
76
77 cat $SCRATCH_DEV >/dev/null &
78 pid=$!
79
80 ltp/fsstress -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID >>$seq.full
81
82 _lets_get_pidst
83 _check_scratch_fs
84
85 echo "*** done"
86 status=0
87 exit