Add test system 'mallet'.
[xfstests-dev.git] / 084
1 #! /bin/sh
2 # FS QA Test No. 084
3 #
4 # Exercises unwritten extent reads and writes, looking
5 # for data corruption (zeroes read) near the end of file.
6 #
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
9 #-----------------------------------------------------------------------
10 #
11 # creator
12 owner=nathans@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 "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21
22 # get standard environment, filters and checks
23 . ./common.rc
24 . ./common.filter
25
26 _filter_resv()
27 {
28         sed -e "s,$TEST_DIR/resv,[TESTFILE],g" \
29             -e 's/[0-9][0-9]* bytes/NUM bytes/g'
30 }
31
32 pgsize=`$here/src/feature -s`
33
34 # -i == number of iterations
35 # -l == bytes to leak on each iteration
36 # -b == read/write block size
37 # -s == preallocation size
38
39 # real QA test starts here
40 _supported_fs xfs
41 _supported_os IRIX Linux
42
43 if [ $HOSTOS == "IRIX" ]; then 
44     if uname -R | grep -iq debug; then 
45         # taking up to 23 mins on my 512K octane on debug
46         # not worth worrying about
47         _notrun "don't bother running on debug IRIX"
48     fi
49 fi
50
51 echo
52 echo "*** First case - I/O blocksize same as pagesize"
53 $here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
54 [ $? -eq 0 ] && echo done
55 rm -f "$TEST_DIR/mumble"
56
57 echo
58 echo "*** Second case - 512 byte I/O blocksize"
59 $here/src/resvtest -i 40 -b 512 "$TEST_DIR/resv" | _filter_resv
60 [ $? -eq 0 ] && echo done
61 rm -f "$TEST_DIR/grumble"
62
63 # success, all done
64 status=0
65 exit