#!/bin/sh
#
# Check that there is no SIGPIPE or dropped data on bigger data transfers.

# We nead GNU head. On some platforms it is named ghead instead of head.
HEAD=head
for p in `echo $PATH | tr ':' '\n'`
do
        if test -x $p/ghead
        then
                HEAD=$p/ghead
                break
        fi
done

# Don't use dd. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=324308
COUNT1=100000000
COUNT2=`$PROG -B 100000 -q /dev/zero | $HEAD -c $COUNT1 | wc -c | tr -d ' '`

#echo "[$COUNT1] [$COUNT2]"

test "x$COUNT1" = "x$COUNT2"

# EOF
