summaryrefslogtreecommitdiff
path: root/tests/014-1mboundary2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/014-1mboundary2')
-rw-r--r--tests/014-1mboundary225
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/014-1mboundary2 b/tests/014-1mboundary2
new file mode 100644
index 0000000..00738cc
--- /dev/null
+++ b/tests/014-1mboundary2
@@ -0,0 +1,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