Skip to content

Commit fd087e4

Browse files
aidangarskedanielinux
authored andcommitted
CI: trigger on all branches and fix unit test assertions
- Update all workflow push triggers from specific branches to ['*'] so CI runs on feature/fix branches - Fix 3 unit tests that assert TCP_ESTABLISHED after accept(); the SYN-ACK retransmission fix correctly keeps accepted sockets in TCP_SYN_RCVD until the final ACK completes the handshake
1 parent 3215f53 commit fd087e4

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/cppcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CppCheck code linter
22

33
on:
44
push:
5-
branches: [ 'master', 'main', 'release/**' ]
5+
branches: [ '*' ]
66
pull_request:
77
branches: [ '*' ]
88

.github/workflows/freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: FreeBSD interop tests
22

33
on:
44
push:
5-
branches: [ 'master', 'main', 'release/**' ]
5+
branches: [ '*' ]
66
pull_request:
77
branches: [ '*' ]
88

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Linux interop tests
22

33
on:
44
push:
5-
branches: [ 'master', 'main', 'release/**' ]
5+
branches: [ '*' ]
66
pull_request:
77
branches: [ '*' ]
88

.github/workflows/macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: macOS interop tests
22

33
on:
44
push:
5-
branches: [ 'master', 'main', 'release/**' ]
5+
branches: [ '*' ]
66
pull_request:
77
branches: [ '*' ]
88

src/test/unit/unit.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5608,7 +5608,9 @@ START_TEST(test_sock_accept_success)
56085608
new_sd = wolfIP_sock_accept(&s, listen_sd, (struct wolfIP_sockaddr *)&sin, &alen);
56095609
ck_assert_int_gt(new_sd, 0);
56105610
new_ts = &s.tcpsockets[SOCKET_UNMARK(new_sd)];
5611-
ck_assert_int_eq(new_ts->sock.tcp.state, TCP_ESTABLISHED);
5611+
/* After accept(), socket stays in SYN_RCVD until final ACK completes
5612+
* the three-way handshake (SYN-ACK retransmission fix). */
5613+
ck_assert_int_eq(new_ts->sock.tcp.state, TCP_SYN_RCVD);
56125614
ck_assert_uint_eq(sin.sin_port, ee16(new_ts->dst_port));
56135615

56145616
listen_ts = &s.tcpsockets[SOCKET_UNMARK(listen_sd)];
@@ -14706,7 +14708,8 @@ START_TEST(test_tcp_listen_accepts_bound_interface)
1470614708
client = &s.tcpsockets[SOCKET_UNMARK(client_fd)];
1470714709
ck_assert_uint_eq(client->local_ip, secondary_ip);
1470814710
ck_assert_uint_eq(client->bound_local_ip, secondary_ip);
14709-
ck_assert_int_eq(client->sock.tcp.state, TCP_ESTABLISHED);
14711+
/* After accept(), socket stays in SYN_RCVD until final ACK. */
14712+
ck_assert_int_eq(client->sock.tcp.state, TCP_SYN_RCVD);
1471014713
}
1471114714
END_TEST
1471214715

@@ -14745,7 +14748,8 @@ START_TEST(test_tcp_listen_accepts_any_interface)
1474514748
ck_assert_int_ge(client_fd, 0);
1474614749
client = &s.tcpsockets[SOCKET_UNMARK(client_fd)];
1474714750
ck_assert_uint_eq(client->local_ip, secondary_ip);
14748-
ck_assert_int_eq(client->sock.tcp.state, TCP_ESTABLISHED);
14751+
/* After accept(), socket stays in SYN_RCVD until final ACK. */
14752+
ck_assert_int_eq(client->sock.tcp.state, TCP_SYN_RCVD);
1474914753
}
1475014754
END_TEST
1475114755

0 commit comments

Comments
 (0)