Expand PMF_FN_* macros.
[netbsd-mini2440.git] / regress / sys / fs / ffs / estimatecompare
blobc7c50d37a26bfc709c0c4dfea17721c271ad9baa
1 #!/bin/sh
2 ## First arg is expected number of blocks. Rest are args to be passed to dump.
3 expectedest=$1
4 shift
6 echo "Expecting estimate around $expectedest blocks:"
7 est=`/sbin/dump $* 2>&1 | grep estimated`
8 echo $est
9 blkest=`echo $est | awk '{print $3;}'`
11 diff=`echo $expectedest $blkest |\
12 awk '{if ($1<$2) print $2-$1; else print $1-$2;}'`
14 thresh=10
15 ## Use an error threshold of $thresh blocks. The error could arise from
16 ## one machine with a larger / and /tmp than the system on which this
17 ## test was developed.
19 if [ $diff -gt $thresh ]; then
20 echo "Error: estimated $blkest blocks!"
21 exit 1