cederom commented on PR #4099:
URL: https://github.com/apache/nuttx-apps/pull/4099#issuecomment-7050755179
Re-review of apache/nuttx-apps#4099 (f6f2364 -> 9b4a934, rebased on master)
testing/nettest: test_tcp_sndtimeo_iob – regression test for
apache/nuttx#22129 (IOB leaked per SO_SNDTIMEO timeout while waiting for an
IOB). Loopback pair, reader never reads, 100 ms SO_SNDTIMEO; after 10
timeouts and close, free IOBs in /proc/iobinfo must return to the pre-test
value within 3 s.
Changes in this push:
- SO_SNDBUF raised to TEST_MAXSENDS * TEST_SENDSIZE (ENOPROTOOPT accepted),
so sends wait for an IOB, not for the send buffer.
- Instead of asserting 10 timeouts, the case skips when fewer than 10
timeouts occur or nfree > CONFIG_IOB_THROTTLE (large pool / send limit).
- ntotal dropped (sscanf "%*d %d").
Checked: registration in test_tcp.c is nested under CONFIG_NET_IPv4 ->
CONFIG_NET_SOCKOPTS -> CONFIG_NET_TCP_WRITE_BUFFERS, matching Makefile and
CMakeLists.txt.
Remaining notes (non-blocking):
1. More skip paths now: a regression that keeps sends from reaching the IOB
wait shows up as a skip, not a failure - CI logs should show the case ran.
2. Close order: the sender (fds[1]) is closed before the non-reading peer
(fds[2]); closing fds[2] first would reset at once and make IOB recovery
more deterministic.
3. A second run in the same boot is skipped (ENOMEM, TIME_WAIT callbacks);
worth a note in the test.
4. Nit: loop counter i reused as the SO_SNDBUF value; a separate int would
read better.
Verdict: LGTM once apache/nuttx#22129 is merged.
--
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]