Two gaps found while reviewing #435. Neither is introduced by that pull request.
Low-watermark code is outside the coverage measurement. No *_coverage profile in test/cmake/netxduo/CMakeLists.txt defines NX_ENABLE_LOW_WATERMARK. Every branch under that option, in _nx_tcp_socket_state_data_check(), _nx_tcp_socket_packet_process() and elsewhere, is therefore never measured. netx_low_watermark_test and netx_tcp_low_watermark_rx_window_test only run their N/A stub in default_build_coverage. #435 enables the option in v4_build and v4_full_build, so the tests now execute, but not in a profile that reports coverage. Adding NX_ENABLE_LOW_WATERMARK to a coverage profile, or adding a low-watermark coverage profile, would close this.
TCP_INFO counters count dropped data as received. In _nx_tcp_socket_state_data_check(), the in-order and empty-queue drop branches release the incoming packet and then fall through to the nx_ip_tcp_packets_received / nx_ip_tcp_bytes_received increments and their per-socket equivalents. When the out-of-order drop branch releases the queue tail, the counts that packet added when it arrived are not taken back. Under low-watermark pressure, nx_tcp_socket_info_get() and nx_tcp_info_get() therefore report more packets and bytes received than were kept. The superset path in the same function already decrements the counters when it releases a queued packet, so the drop paths can do the same.
Two gaps found while reviewing #435. Neither is introduced by that pull request.
Low-watermark code is outside the coverage measurement. No
*_coverageprofile intest/cmake/netxduo/CMakeLists.txtdefinesNX_ENABLE_LOW_WATERMARK. Every branch under that option, in_nx_tcp_socket_state_data_check(),_nx_tcp_socket_packet_process()and elsewhere, is therefore never measured.netx_low_watermark_testandnetx_tcp_low_watermark_rx_window_testonly run their N/A stub indefault_build_coverage. #435 enables the option inv4_buildandv4_full_build, so the tests now execute, but not in a profile that reports coverage. AddingNX_ENABLE_LOW_WATERMARKto a coverage profile, or adding a low-watermark coverage profile, would close this.TCP_INFO counters count dropped data as received. In
_nx_tcp_socket_state_data_check(), the in-order and empty-queue drop branches release the incoming packet and then fall through to thenx_ip_tcp_packets_received/nx_ip_tcp_bytes_receivedincrements and their per-socket equivalents. When the out-of-order drop branch releases the queue tail, the counts that packet added when it arrived are not taken back. Under low-watermark pressure,nx_tcp_socket_info_get()andnx_tcp_info_get()therefore report more packets and bytes received than were kept. The superset path in the same function already decrements the counters when it releases a queued packet, so the drop paths can do the same.