Skip to content

Commit

Permalink
[mac] Turn on TestTCP (#15197)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Nov 1, 2023
1 parent 14e4d87 commit 2595849
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/inet/TCPEndPointImplSockets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,12 @@ CHIP_ERROR TCPEndPointImplSockets::CheckConnectionProgress(bool & isProgressing)

// Fetch the bytes pending successful transmission in the TCP out queue.

#ifdef __APPLE__
socklen_t len = sizeof(currPendingBytesRaw);
if (getsockopt(mSocket, SOL_SOCKET, SO_NWRITE, &currPendingBytesRaw, &len) < 0)
#else
if (ioctl(mSocket, TIOCOUTQ, &currPendingBytesRaw) < 0)
#endif
{
return CHIP_ERROR_POSIX(errno);
}
Expand Down
5 changes: 1 addition & 4 deletions src/transport/raw/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ chip_test_suite("tests") {
test_sources = [
"TestMessageHeader.cpp",
"TestPeerAddress.cpp",
"TestTCP.cpp",
]

if (current_os != "mac") {
test_sources += [ "TestTCP.cpp" ]
}

public_deps = [
":helpers",
"${chip_root}/src/inet/tests:helpers",
Expand Down

0 comments on commit 2595849

Please sign in to comment.