mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
tcp: Check tcp_output return values in tests
Found with clang-analyzer
This commit is contained in:
parent
21fba21054
commit
c825eb3604
@ -665,6 +665,7 @@ START_TEST(test_tcp_fast_rexmit_wraparound)
|
||||
check_seqnos(pcb->unsent, 6, seqnos);
|
||||
EXPECT(pcb->unacked == NULL);
|
||||
err = tcp_output(pcb);
|
||||
EXPECT_RET(err == ERR_OK);
|
||||
EXPECT(txcounters.num_tx_calls == 2);
|
||||
EXPECT(txcounters.num_tx_bytes == 2 * (TCP_MSS + 40U));
|
||||
memset(&txcounters, 0, sizeof(txcounters));
|
||||
@ -753,6 +754,7 @@ START_TEST(test_tcp_rto_rexmit_wraparound)
|
||||
check_seqnos(pcb->unsent, 6, seqnos);
|
||||
EXPECT(pcb->unacked == NULL);
|
||||
err = tcp_output(pcb);
|
||||
EXPECT_RET(err == ERR_OK);
|
||||
EXPECT(txcounters.num_tx_calls == 2);
|
||||
EXPECT(txcounters.num_tx_bytes == 2 * (TCP_MSS + 40U));
|
||||
memset(&txcounters, 0, sizeof(txcounters));
|
||||
@ -1101,6 +1103,7 @@ START_TEST(test_tcp_rto_tracking)
|
||||
check_seqnos(pcb->unsent, 5, seqnos);
|
||||
EXPECT(pcb->unacked == NULL);
|
||||
err = tcp_output(pcb);
|
||||
EXPECT_RET(err == ERR_OK);
|
||||
EXPECT(txcounters.num_tx_calls == 5);
|
||||
EXPECT(txcounters.num_tx_bytes == 5 * (TCP_MSS + 40U));
|
||||
memset(&txcounters, 0, sizeof(txcounters));
|
||||
@ -1216,6 +1219,7 @@ static void test_tcp_rto_timeout_impl(int link_down)
|
||||
err = tcp_write(pcb, &tx_data[0], TCP_MSS, TCP_WRITE_FLAG_COPY);
|
||||
EXPECT_RET(err == ERR_OK);
|
||||
err = tcp_output(pcb);
|
||||
EXPECT_RET(err == ERR_OK);
|
||||
EXPECT(txcounters.num_tx_calls == 1);
|
||||
EXPECT(txcounters.num_tx_bytes == 1 * (TCP_MSS + 40U));
|
||||
memset(&txcounters, 0, sizeof(txcounters));
|
||||
|
Loading…
Reference in New Issue
Block a user