Minor testsuite behaviour updates.

This commit is contained in:
Sam Hocevar
2010-01-31 12:18:01 +00:00
committed by sam
parent 586b5df8a0
commit 70b8eacf6f
2 changed files with 6 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ fi
failure=0
for dir in src test; do
(cd $(dirname "$0")/../$dir
for x in $(make echo-sources); do
for x in $(make -s echo-sources); do
if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
echo "error: $dir/$x contains trailing spaces"
failure=1

View File

@@ -23,17 +23,20 @@ checkflip()
rmin=-1
rtot=0
new_test "$mib MiB of zeroes, ratio $r"
echo " expecting $expect"
printf " got"
for x in 0 1 2 3 4; do
ret=`dd if=/dev/zero bs=1048576 count=$mib 2>/dev/null | $ZZUF -s $s2 -r $r | "$ZZERO"`
if [ "$rmax" = -1 -o "$ret" -gt "$rmax" ]; then rmax=$ret; fi
if [ "$rmin" = -1 -o "$ret" -lt "$rmin" ]; then rmin=$ret; fi
rtot=`expr $rtot + $ret || true`
echo " try $x .......... $ret"
printf " $ret"
s2=`expr $s2 + 1`
done
echo ""
rmean=`expr '(' $rtot + 2 ')' / 5 || true`
delta=`expr $rmean - $expect || true`
printf " expected $expect min/avg/max $rmin/$rmean/$rmax .........."
printf " min/avg/max $rmin/$rmean/$rmax .........."
if [ "$delta" -gt -5 -a "$delta" -lt 5 ]; then
pass_test " ok"
elif [ $(($rmean * 8)) -lt $(($expect * 7)) \