summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-07-23 22:38:46 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-07-23 22:38:46 +0000
commit1c47f61154e2808aeb0163f1e31291f4ba06032d (patch)
treea4be909201437741c737156456d475fb82711ea0 /regress
parent3b67e09987045e347a9c5d5001871629f706fdce (diff)
I need one more fragment to make the timeout test reliable.
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/netinet6/frag6/Makefile5
-rw-r--r--regress/sys/netinet6/frag6/frag6_timeout.py10
2 files changed, 8 insertions, 7 deletions
diff --git a/regress/sys/netinet6/frag6/Makefile b/regress/sys/netinet6/frag6/Makefile
index 55434b249d1..83d761ada24 100644
--- a/regress/sys/netinet6/frag6/Makefile
+++ b/regress/sys/netinet6/frag6/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.7 2013/07/23 22:15:04 bluhm Exp $
+# $OpenBSD: Makefile,v 1.8 2013/07/23 22:38:45 bluhm Exp $
# The following ports must be installed:
#
@@ -166,7 +166,7 @@ run-regress-frag6-udppayload: addr.py
@echo Check ping6 udp payload fragment
${SUDO} python2.7 frag6_udppayload.py
-# fragmented icmp packet not within 60 second timeout
+# fragmented icmp packet not within 60 second timeout, test takes 90 seconds
TARGETS += frag6-timeout
run-regress-frag6-timeout: addr.py
@echo '\n======== $@ ========'
@@ -174,7 +174,6 @@ run-regress-frag6-timeout: addr.py
${SUDO} python2.7 frag6_timeout.py
REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/}
-REGRESS_SLOW_TARGETS = run-regress-frag6-timeout
CLEANFILES += addr.py *.pyc *.log
diff --git a/regress/sys/netinet6/frag6/frag6_timeout.py b/regress/sys/netinet6/frag6/frag6_timeout.py
index 7082fa6f3b5..e43984eee62 100644
--- a/regress/sys/netinet6/frag6/frag6_timeout.py
+++ b/regress/sys/netinet6/frag6/frag6_timeout.py
@@ -1,25 +1,27 @@
#!/usr/local/bin/python2.7
-# send 5 non-overlapping ping6 fragments in 75 seconds, timeout is 60
+# send 6 non-overlapping ping6 fragments in 75 seconds, timeout is 60
# |----|
# |----|
# |----|
# |----|
-# |----|
+# |----| <--- timeout
+# |----|
import os
from addr import *
from scapy.all import *
pid=os.getpid()
-payload="ABCDEFGHIJKLMNOPQRSTUVWXYZ123456"
+payload="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcd"
packet=IPv6(src=SRC_OUT6, dst=DST_IN6)/ICMPv6EchoRequest(id=pid, data=payload)
frag=[]
frag.append(IPv6ExtHdrFragment(nh=58, id=pid, m=1)/str(packet)[40:48])
frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=1, m=1)/str(packet)[48:56])
frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=2, m=1)/str(packet)[56:64])
frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=3, m=1)/str(packet)[64:72])
-frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=4)/str(packet)[72:80])
+frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=4, m=1)/str(packet)[72:80])
+frag.append(IPv6ExtHdrFragment(nh=58, id=pid, offset=5)/str(packet)[80:88])
eth=[]
for f in frag:
pkt=IPv6(src=SRC_OUT6, dst=DST_IN6)/f