casaroli opened a new pull request, #4165:
URL: https://github.com/apache/nuttx-apps/pull/4165

   depends-on: apache/nuttx#22429
   
   ## Summary
   
   New cases for the errors of TCP `connect()`:
   
   - `cmocka_net_tcp`: `test_tcp_connect_listener` (`connect()` on a listening 
socket fails with `EISCONN`, and the socket still listens), 
`test_tcp_connect_family` (`connect()` of an `AF_INET` socket to an `AF_UNIX` 
address fails with `EAFNOSUPPORT`), `test_tcp_reset_closewait` (a RST after the 
FIN of the peer gives `EPIPE` in `SO_ERROR` once, a `poll()` after it sets no 
other error, and `send()` gives `EPIPE`).
   - `cmocka_net_tun`: `test_tun_tcp_connect_again` (a second `connect()` while 
the handshake of a non-blocking `connect()` goes on fails with `EALREADY`), 
`test_tun_tcp_connect_intr` (a signal interrupts a blocking `connect()`: 
`EINTR`, the handshake goes on, a second `connect()` gives `EALREADY`, and the 
socket connects when the peer answers). The program plays the peer on the TUN 
device and answers the SYN only after the checks.
   
   `test_tcp_connect_family` is the last case of `cmocka_net_tcp`: without the 
kernel fix a build with assertions stops there, after the other cases ran.
   
   ## Impact
   
   Test only. Without apache/nuttx#22429 the 5 cases fail (and 
`test_tcp_connect_family` stops a build with assertions).
   
   ## Testing
   
   | Config | master 453cafdc4dd | apache/nuttx#22429 |
   |---|---|---|
   | qemu-armv8a:knsh (kernel), QEMU TCG, 3 boots | `test_tcp_connect_listener` 
FAIL (`ECONNREFUSED`, not `EISCONN`), `test_tun_tcp_connect_again` and `_intr` 
FAIL (`EISCONN`, not `EALREADY`), `test_tcp_reset_closewait` FAIL (`SO_ERROR` 
0), `test_tcp_connect_family` stops at the assertion in `inet_connect()`, 3 of 
3 | all pass, 3 of 3 |
   | qemu-armv8a:nsh (flat), TCG, 1 boot | the same | all pass |
   | qemu-intel64:knsh_romfs (kernel, CMake), KVM, 1 boot | the same | all pass 
|
   
   Builds with `-Werror` in the CI image: qemu-armv8a:knsh and :nsh, 
rv-virt:knsh and :nsh, qemu-intel64:knsh_romfs (CMake).
   


-- 
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]

Reply via email to