6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=0 # success is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
25 rm -rf $testdir/holes.$$.*
31 ls -l $1 | $AWK_PROG '{print " filesize = " $5}'
34 # get standard environment, filters and checks
46 out=$testdir/holes.$$.$_n
48 echo "holes.$_n : $_param"
49 echo "-----------------------------------------------"
50 if ! $here/src/holes $_param $out >$tmp.out
52 echo " holes returned $? - see $seq.out.full"
60 # quick check - how many holes did we get?
61 count=`xfs_bmap $out | egrep -c ': hole'`
62 echo " $count hole(s) detected"
63 # and how big was the file?
66 if [ $count -ne $_count ]
68 echo " unexpected number of holes - see $seq.out.full"
76 echo "--------------------------------------" >>$here/$seq.out.full
77 echo "$_n - output from holes:" >>$here/$seq.out.full
78 echo "--------------------------------------" >>$here/$seq.out.full
79 cat $tmp.out >>$here/$seq.out.full
80 echo "--------------------------------------" >>$here/$seq.out.full
81 echo "$_n - output from bmap:" >>$here/$seq.out.full
82 echo "--------------------------------------" >>$here/$seq.out.full
83 xfs_bmap -vvv $out >>$here/$seq.out.full
84 echo "--------------------------------------" >>$here/$seq.out.full
85 echo "$_n - output from ls -li:" >>$here/$seq.out.full
86 echo "--------------------------------------" >>$here/$seq.out.full
87 ls -li $out >>$here/$seq.out.full
92 # real QA test starts here
94 _supported_os IRIX Linux
98 rm -f $here/$seq.out.full
100 # small & fairly dense
101 _do_test 1 "-l 40960000 -b 40960 -i 10 -c 1" 100
104 _do_test 2 "-l 409600000 -b 40960 -i 1000 -c 1" 10
106 # no holes, but a very nasty way to write a file (lots of extents)
107 _do_test 3 "-l 40960000 -b 40960 -i 10 -c 10" 0