Skip to content

Commit

Permalink
gnrc_tcp: fix test part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
brummer-simon committed Oct 14, 2020
1 parent 55314bd commit 57c8be3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/gnrc_tcp/tests/05-garbage-pkts.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,15 @@ def test_short_header(child, src_if, src_ll, dst_if, dst_l2, dst_ll, dst_port):
@testfunc
def test_send_ack_instead_of_syn(child, src_if, src_ll,
dst_if, dst_l2, dst_ll, dst_port):
# check if entering _event_loop in `@testfunc` decorator generates debug
# output
debug = child.expect([pexpect.TIMEOUT, 'GNRC_TCP'], timeout=1)
# with debug output the node can be overwhelmed by packets + output
# check if any debug output is generated during `@testfunc` decorator
# execution. If so, send fewer packets to prevent the target node
# from being overwhelmed by packets and output.
debug = child.expect([pexpect.TIMEOUT, '^GNRC_TCP: Enter ".*", File:.*(\d*)$'], timeout=1)
if debug:
count = 10
else:
count = 1000

print(debug)
print(count)
# see https://github.com/RIOT-OS/RIOT/pull/12001
provided_data = base64.b64decode("rwsQf2pekYLaU+exUBBwgPDKAAA=")
tcp_hdr = TCP(provided_data)
Expand Down

0 comments on commit 57c8be3

Please sign in to comment.