casaroli opened a new pull request, #4100: URL: https://github.com/apache/nuttx-apps/pull/4100
## Summary depends-on: apache/nuttx/pull/22131 A new case of `cmocka_net_tcp`, `test_tcp_send_limit_wakeup`: for 10 seconds, the test thread sends 16 KiB messages over 127.0.0.1, and a second thread reads each message and answers one byte. With a send limit smaller than a message (`CONFIG_NET_SEND_BUFSIZE`, or `SO_SNDBUF`), `send()` waits on the limit in each round, and the ACK of the last data must wake it. Each round must end within 2 seconds. The sockets have 5 s time-outs, so a lost wakeup fails the case; it does not hang. The ACK is often handled on another CPU while the sender is about to wait, so the case finds the lost wakeup that apache/nuttx#22131 fixes best with `CONFIG_SMP`. Without a send limit (the default before the default limit of apache/nuttx#22089) the case passes: `send()` does not wait on a limit. ## Impact `testing/nettest` only: one more case in `cmocka_net_tcp`, built with `CONFIG_NET_IPv4` and `CONFIG_NET_SOCKOPTS`. Its list entries in the Makefile, `CMakeLists.txt`, `test_tcp.c` and `test_tcp.h` are on other lines than those of the open nettest PRs (#4086, #4096, #4099), so the PRs do not conflict. ## Testing qemu-armv8a:knsh under HVF, 96 IOBs of 196 bytes, `IOB_THROTTLE` 8, `CONFIG_NET_TCP_WRITE_BUFFERS`, `CONFIG_NET_SEND_BUFSIZE=2156` and `CONFIG_NET_RECV_BUFSIZE=2156`; nuttx master 5e4ecd1d603 with apache/nuttx#22025 (without it, the TIME_WAIT connections of the earlier cases can use all devif callbacks), with and without apache/nuttx#22131. One `cmocka_net_tcp` per boot; 3 of the 5 boots ran an earlier version of this commit that differs only in the place of the list entries and in the failure messages. | `test_tcp_send_limit_wakeup` | master | with apache/nuttx#22131 | |---|---|---| | knsh, 4 CPUs, 5 boots | FAIL 5 of 5: a round waits 10 s or 15 s | PASS 5 of 5 | | knsh, 1 CPU | | PASS | | flat qemu-armv8a:nsh, 4 CPUs, 1 boot | PASS (the race was not hit) | PASS | | knsh, 4 CPUs, `CONFIG_NET_SEND_BUFSIZE` 0 | | PASS | | knsh, 1 and 4 CPUs, flat nsh, with the default limit of apache/nuttx#22089 | | PASS | `test_tcp_connect_ipv4` fails in this configuration on all versions (`ECONNREFUSED` from the group server). How CI would run it: rv-virt:citest builds `cmocka_net_tcp` (`CONFIG_TESTING_NET_TEST`), but no NTFC case runs `cmocka_net_tcp` yet, and the CI configurations with networking have no send limit and no SMP. A run in CI needs an NTFC case for `cmocka_net_tcp` on an SMP configuration with `CONFIG_NET_TCP_WRITE_BUFFERS` and a send limit (`CONFIG_NET_SEND_BUFSIZE > 0`, or the default limit of apache/nuttx#22089). Builds in the NuttX CI image (`EXTRAFLAGS="-Wno-cpp -Werror"`) with `cmocka_net_tcp`: qemu-armv8a:netnsh with TCP write buffers (Make and CMake), without TCP write buffers, with the default limit of apache/nuttx#22089, and sim:tcpblaster: all OK, 0 warnings, the case is linked in each. `tools/checkpatch.sh -c -u -m -g` passes. Documentation: the nettest cases are not listed in Documentation/; no change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
