diff options
Diffstat (limited to 'tests/013-1mboundary')
-rw-r--r-- | tests/013-1mboundary | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/013-1mboundary b/tests/013-1mboundary new file mode 100644 index 0000000..89e2523 --- /dev/null +++ b/tests/013-1mboundary @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Check that the bytes count doesn't increase the line length as it passes +# 1MiB, described here: +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586763 + +# Transfer 1500kB of data in a bursty fashion. +# +(dd if=/dev/zero bs=1k count=999; + sleep 1; + dd if=/dev/zero bs=1k count=1; + sleep 1; + dd if=/dev/zero bs=1k count=500; + sleep 1; +) 2>/dev/null | ($PROG -btef -s 1500k >/dev/null) 2>$TMP1 + +# Count how many different line lengths we've seen. +# +NUM=`tr '\r' '\n' < $TMP1 | awk '{x=length($0);if(x>0)print length($0)}' | sort | uniq | wc -l` + +# There should only be one length (not counting 0). +# +test $NUM -eq 1 || { echo; tr '\r' '\n' < $TMP1; exit 1; } + +# EOF |