zephyr/tests/lib
Robert Lubos 822a82d619 tests: lib: thrift: Fix timing issues with TCP
The test delegates putting the server socket into listening (i. e.
calling listen() on the socket) to a separate thread, which did have a
chance to run before client attempted to establish TCP connection.

This was not visible before, as we did not reply with RST to a
connection attempt on a closed port, so the connection was eventually
establish after SYN retransmission. But as we do reject such a
connection now with RST, the connection attempt failed. Therefore, a
small delay was added after spawning the server thread, to give it a
chance to configure the server socket.

Additionally, lower the CONFIG_NET_TCP_TIME_WAIT_DELAY value so that TCP
contexts are released earlier, and add a respective delay in the test
teardown function. Not doing so also triggered unneeded SYN
retransmissions, as there were no enough TCP context to accept the
incoming connection, before freeing the resources allocated for the
previous one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-10-20 15:13:22 +02:00
..
c_lib tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
cbprintf_fp tests: cbprintf: fix test meta data and components 2023-10-11 14:19:40 +03:00
cbprintf_package tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
cmsis_dsp cmsis_dsp: remove handling of old ztest API 2023-10-20 15:04:29 +02:00
cmsis_nn tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
cpp tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
devicetree tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
fdtable tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
gui/lvgl tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
hash_function tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
hash_map tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
heap tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
heap_align tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
json tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
linear_range tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mem_alloc tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mem_blocks tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mem_blocks_stats tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mpsc_pbuf tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
newlib tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
notify tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
onoff tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
p4workq tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
ringbuffer tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
smf tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
sprintf tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
spsc_pbuf tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
sys_util tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
thrift/ThriftTest tests: lib: thrift: Fix timing issues with TCP 2023-10-20 15:13:22 +02:00
time tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00