casaroli opened a new pull request, #4104: URL: https://github.com/apache/nuttx-apps/pull/4104
## Summary depends-on: apache/nuttx/pull/22143 New cases for the fixes of apache/nuttx#22143, one commit each: - `test_tcp_listen_recv` (`cmocka_net_tcp`): `recv()` on a listener and on a TCP socket that never connected must fail with `ENOTCONN`. Before the receives, a loopback connection whose reader does not read takes the free I/O buffers down to `CONFIG_IOB_THROTTLE`. On master the first receive stops the kernel with a data abort in `tcp_rx_mss()`. - `test_tcp_recv_iov_empty` and `test_tcp_recv_iov_nowait` (`cmocka_net_tcp`): `readv()` and `recvmsg(MSG_DONTWAIT)` with an empty first buffer receive the data in the second buffer; a `readv()` whose first buffer takes all the data returns at once. On master the first `readv()` returns 0 and the second waits 1 s. - `test_udp_v6only_tcp_mapped` (`cmocka_net_udp`, next to the other `IPV6_V6ONLY` cases): `connect()` of an `AF_INET6` TCP socket to `::ffff:127.0.0.1` must fail with `ENETUNREACH`. On master it sends an IPv6 SYN to the mapped address. - `test_tcp_peername_ipv6` (`cmocka_net_tcp`) and a new check in `test_udp_family_connect`: `getpeername()` of an IPv6 socket gives the peer port. On master it gives the own port. ## Impact Only `testing/nettest`: two new source files (`test_tcp_iov.c` with `CONFIG_NET_IPv4`, `test_tcp_peername.c` with `CONFIG_NET_IPv6`) and their lines in `Makefile` and `CMakeLists.txt`; new cases in `test_tcp_bind_listen.c`, `test_udp_v6only.c` and `test_udp_family.c`. No new Kconfig option. ## Testing qemu-armv8a under HVF, `NET_IPv6`, knsh with 1 and 4 CPUs and flat nsh: | Case | NuttX master | with apache/nuttx#22143 | |---|---|---| | `test_tcp_listen_recv` | data abort, FAR 0x40 | PASS | | `test_tcp_recv_iov_empty`, `test_tcp_recv_iov_nowait` | FAIL: `readv()` returns 0; the second `readv()` takes 1001 ms | PASS | | `test_udp_v6only_tcp_mapped`, knsh with virtio-net, no ICMPv6 | panic in `neighbor_ethernet_out()` | PASS | | `test_tcp_peername_ipv6`, `test_udp_family_connect` | FAIL: the own port | PASS | Run again on NuttX master 5814b404c95 and with apache/nuttx#22143, knsh with 4 CPUs and flat nsh: the same results. All other cases of `cmocka_net_tcp` and `cmocka_net_udp` give the same result on both, except flat nsh `test_tcp_reset_send`, which fails on both (the `SIGPIPE` goes to another thread). The test server needs apache/nuttx-apps#4103. `tools/checkpatch.sh -c -u -m -g` passes. -- 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]
