summaryrefslogtreecommitdiff
path: root/tests/014-1mboundary2
blob: 00738ccaedf54fd9d0306b199ac233c34429a00f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# Same as test 13 (1mboundary) but for rate, not bytes transferred.

# 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=3 count=1;
 sleep 1;
 dd if=/dev/zero bs=1k count=500;
 sleep 1;
) 2>/dev/null | ($PROG -rtef -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