Skip to content

Commit 47d4fef

Browse files
committed
fix unit tests
1 parent a70c886 commit 47d4fef

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/test/unit/unit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4741,6 +4741,9 @@ START_TEST(test_poll_tcp_ack_only_skips_send)
47414741
ts->sock.tcp.ack = 10;
47424742
ts->sock.tcp.last_ack = 10;
47434743
ts->sock.tcp.rto = 100;
4744+
/* Ensure send window allows processing of the queued ACK-only segment. */
4745+
ts->sock.tcp.cwnd = TCP_MSS;
4746+
ts->sock.tcp.peer_rwnd = TCP_MSS;
47444747
fifo_init(&ts->sock.tcp.txbuf, ts->txmem, TXBUF_SIZE);
47454748

47464749
ck_assert_int_eq(enqueue_tcp_tx(ts, 0, 0x10), 0);
@@ -4783,6 +4786,9 @@ START_TEST(test_poll_tcp_send_on_arp_hit)
47834786
ts->sock.tcp.ack = 20;
47844787
ts->sock.tcp.last_ack = 0;
47854788
ts->sock.tcp.rto = 100;
4789+
/* Ensure send window allows emitting the queued data segment. */
4790+
ts->sock.tcp.cwnd = TCP_MSS * 4;
4791+
ts->sock.tcp.peer_rwnd = TCP_MSS * 4;
47864792
fifo_init(&ts->sock.tcp.txbuf, ts->txmem, TXBUF_SIZE);
47874793

47884794
ck_assert_int_eq(enqueue_tcp_tx(ts, 1, 0x18), 0);

0 commit comments

Comments
 (0)