mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
netpfil tests: make dummynet tests more robust
These tests try to verify that packet prioritisation works as expected. This is inherently a statistical process, and is difficuly to measure automatically. Run the tests more times and accept more failures. Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
7390daf87c
commit
a46c121db4
@ -320,7 +320,7 @@ queue_body()
|
|||||||
|
|
||||||
# TCP should still just pass
|
# TCP should still just pass
|
||||||
fails=0
|
fails=0
|
||||||
for i in `seq 1 3`
|
for i in `seq 1 5`
|
||||||
do
|
do
|
||||||
result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c)
|
result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c)
|
||||||
if [ $result -ne 2048000 ];
|
if [ $result -ne 2048000 ];
|
||||||
@ -329,7 +329,7 @@ queue_body()
|
|||||||
fails=$(( ${fails} + 1 ))
|
fails=$(( ${fails} + 1 ))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ${fails} -gt 0 ];
|
if [ ${fails} -gt 2 ];
|
||||||
then
|
then
|
||||||
atf_fail "We failed prioritisation ${fails} times"
|
atf_fail "We failed prioritisation ${fails} times"
|
||||||
fi
|
fi
|
||||||
@ -348,7 +348,7 @@ queue_body()
|
|||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
fails=0
|
fails=0
|
||||||
for i in `seq 1 3`
|
for i in `seq 1 5`
|
||||||
do
|
do
|
||||||
result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c)
|
result=$(dd if=/dev/zero bs=1024 count=2000 | timeout 3 nc -w 5 -N 192.0.2.2 7 | wc -c)
|
||||||
if [ $result -ne 2048000 ];
|
if [ $result -ne 2048000 ];
|
||||||
@ -429,7 +429,7 @@ queue_v6_body()
|
|||||||
|
|
||||||
# TCP should still just pass
|
# TCP should still just pass
|
||||||
fails=0
|
fails=0
|
||||||
for i in `seq 1 3`
|
for i in `seq 1 5`
|
||||||
do
|
do
|
||||||
result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c)
|
result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c)
|
||||||
if [ $result -ne 1024000 ];
|
if [ $result -ne 1024000 ];
|
||||||
@ -438,7 +438,7 @@ queue_v6_body()
|
|||||||
fails=$(( ${fails} + 1 ))
|
fails=$(( ${fails} + 1 ))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ ${fails} -gt 0 ];
|
if [ ${fails} -gt 2 ];
|
||||||
then
|
then
|
||||||
atf_fail "We failed prioritisation ${fails} times"
|
atf_fail "We failed prioritisation ${fails} times"
|
||||||
fi
|
fi
|
||||||
@ -454,7 +454,7 @@ queue_v6_body()
|
|||||||
"pass in proto icmp6 dnqueue (0, 100)"
|
"pass in proto icmp6 dnqueue (0, 100)"
|
||||||
|
|
||||||
fails=0
|
fails=0
|
||||||
for i in `seq 1 3`
|
for i in `seq 1 5`
|
||||||
do
|
do
|
||||||
result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c)
|
result=$(dd if=/dev/zero bs=1024 count=1000 | timeout 3 nc -w 5 -N 2001:db8:42::2 7 | wc -c)
|
||||||
if [ $result -ne 1024000 ];
|
if [ $result -ne 1024000 ];
|
||||||
|
Loading…
Reference in New Issue
Block a user