6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=0 # success is the default!
19 pgsize=`$here/src/feature -s`
20 trap "_cleanup; exit \$status" 0 1 2 3 15
25 rm -rf $testdir/randholes.$$.*
31 sed -e "s/-b $pgsize/-b PGSIZE/g"
34 # get standard environment, filters and checks
44 out=$testdir/randholes.$$.$_n
46 echo "randholes.$_n : $_param" | _filter
47 echo "------------------------------------------"
48 if $here/src/randholes $_param $out >$tmp.out
50 # quick check - how many holes did we get?
51 count=`xfs_bmap $out | egrep -c ': hole'`
52 # blocks can end up adjacent, therefore number of holes varies
53 _within_tolerance "holes" $count $_holes 10% -v
55 echo " randholes returned $? - see $seq.out.full"
56 echo "--------------------------------------" >>$here/$seq.out.full
57 echo "$_n - output from randholes:" >>$here/$seq.out.full
58 echo "--------------------------------------" >>$here/$seq.out.full
59 cat $tmp.out >>$here/$seq.out.full
60 echo "--------------------------------------" >>$here/$seq.out.full
61 echo "$_n - output from bmap:" >>$here/$seq.out.full
62 echo "--------------------------------------" >>$here/$seq.out.full
63 xfs_bmap -vvv $out >>$here/$seq.out.full
68 # real QA test starts here
70 _supported_os IRIX Linux
74 rm -f $here/$seq.out.full
76 _do_test 1 50 "-l 5000000 -c 50 -b $pgsize"
77 _do_test 2 100 "-l 10000000 -c 100 -b $pgsize"
78 _do_test 3 100 "-l 10000000 -c 100 -b 512" # test partial pages
80 # rinse, lather, repeat for direct IO
81 _do_test 4 50 "-d -l 5000000 -c 50 -b $pgsize"
82 _do_test 5 100 "-d -l 10000000 -c 100 -b $pgsize"
83 # note: direct IO requires page aligned IO