[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: test improvement (#11930)
notifications at github.com
Sat Sep 28 12:04:26 CEST 2019
brummer-simon commented on this pull request.
> + # Verify that RIOT Applications internal buffer can hold test data.
+ assert setup_internal_buffer(child) >= data_len
+ server_handle = threading.Thread(target=tcp_server, args=(port, data))
+ target_addr = get_host_ll_addr(get_host_tap_device()) + '%' + get_riot_if_id(child)
+ # Setup RIOT Node to connect to Hostsystems TCP Server
+ child.sendline('gnrc_tcp_open_active AF_INET6 ' + target_addr + " " + str(port) + ' 0')
+ child.expect_exact('gnrc_tcp_open_active: returns 0')
+ # Accept Data sent by the host system
+ child.sendline('gnrc_tcp_recv 0 ' + str(data_len))
+ child.expect_exact('gnrc_tcp_recv: received ' + str(data_len))
Okay I "fixed" the issue. Actually the tests have shown perfectly valid behavior. By supplying no timeout gnrc_tcp_recv returns if there are was no data received.
Since Linux buffers TCP data to send internally instead of sending it right away, gnrc_tcp_recv tries to fetch data that has not been sent before. I fixed the issue by supplying a timeout value forcing gnrc_tcp_recv to wait for incoming data.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications