[riot-notifications] [RIOT-OS/RIOT] gnrc_tcp: test improvement (#11930)
notifications at github.com
Wed Sep 25 10:29:06 CEST 2019
miri64 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))
This is not synchronized with `tcp_server` so you might run into a race condition were the data is not sent yet.
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