summaryrefslogtreecommitdiff
path: root/tests/002-rate
blob: 2609ce4f7226bc05fc5a69e6cfea3778f3902cd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
#
# A simple test of rate limiting.

# Transfer 102 bytes at 100 bytes/sec. It should take at least 1 second.
#
START=`date +%S`
dd if=/dev/zero bs=102 count=1 2>/dev/null | $PROG -L 100 2>/dev/null | cat >/dev/null
END=`date +%S`

test $START -ne $END

# EOF