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 d2ec12d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 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,16 @@ 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,
r'GNRC_TCP: Enter "\S+", File: .+(\d+)\s'], 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 d2ec12d

Please sign in to comment.