summaryrefslogtreecommitdiffstats
path: root/regress/sys/net/pf_fragment/frag6.py
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2016-10-20 19:16:05 +0000
committerbluhm <bluhm@openbsd.org>2016-10-20 19:16:05 +0000
commit9a7ee091fad639065b941b87634d41ec395438e6 (patch)
tree3f49d60afbe40c05a733e37661aebb794ce59b5a /regress/sys/net/pf_fragment/frag6.py
parentOnly drop to _ping user if invoked as root. If invoked as an (diff)
downloadwireguard-openbsd-9a7ee091fad639065b941b87634d41ec395438e6.tar.xz
wireguard-openbsd-9a7ee091fad639065b941b87634d41ec395438e6.zip
By removing all the sleeps I created a race in the pf tests. The
packet was sent and its reply received before the sniffer was up and running. So sleep a second after starting the sniffer thread but before sending the packet. With pf_forward 0m51.54s, pf_fragment 1m33.59s, pf_state 0m03.64s the test are still faster than with forking.
Diffstat (limited to 'regress/sys/net/pf_fragment/frag6.py')
-rw-r--r--regress/sys/net/pf_fragment/frag6.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/regress/sys/net/pf_fragment/frag6.py b/regress/sys/net/pf_fragment/frag6.py
index 81259afd3bb..e24c4fe5f71 100644
--- a/regress/sys/net/pf_fragment/frag6.py
+++ b/regress/sys/net/pf_fragment/frag6.py
@@ -31,6 +31,7 @@ eth.append(Ether(src=SRC_MAC, dst=PF_MAC)/pkt1)
sniffer = Sniff1();
sniffer.filter = "ip6 and src %s and dst %s and icmp6" % (dstaddr, SRC_OUT6)
sniffer.start()
+time.sleep(1)
sendp(eth, iface=SRC_IF)
sniffer.join(timeout=5)
a = sniffer.packet