Skip to content

Conversation

@chinglee-iot
Copy link
Contributor

In this PR:

  • Transport interface recv function returns 0 should represent the read operation can be retried. Negative value should be returned when input parameters and recv bytes are invalid. Reference this document.

Test
Run the transport interface test the following test cases should has no error.

TEST(Full_TransportInterfaceTest, TransportRecv_NetworkContextNullPtr)./components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/transport_interface/transport_interface_test.c:865::FAIL: Expected 0 to be less than 0. Transport interface recv with NULL network context pointer should return negative value.

TEST(Full_TransportInterfaceTest, TransportRecv_BufferNullPtr)./components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/transport_interface/transport_interface_test.c:886::FAIL: Expected 0 to be less than 0. Transport interface recv with NULL buffer pointer should return negative value.

TEST(Full_TransportInterfaceTest, TransportRecv_ZeroByteToRecv)./components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/transport_interface/transport_interface_test.c:905::FAIL: Expected 0 to be less than 0. Transport interface recv with zero byte to recv should return negative value.

* Transport interface recv function returns 0 should represent the
  read operation can be retried. Negative value should be returned
  when input parameters and recv bytes are invalid,
@CLAassistant
Copy link

CLAassistant commented Aug 23, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot changed the title Fix transport recv return value Fix transport recv return value (CA-343) Aug 23, 2024
@avsheth avsheth merged commit cd1bd3b into espressif:release/202406.01-LTS Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants