Skip to content

Commit

Permalink
[Inet] Make tests fail on EADDRNOTAVAIL (#13080)
Browse files Browse the repository at this point in the history
#### Problem

Fixes #2698 Once CI supports IPV6, TestTCP/UDP should make the 'EADDRNOTAVAIL' fatal

#### Change overview

Remove the special handling of `EADDRNOTAVAIL`.

#### Testing

CI
  • Loading branch information
kpschoedel authored and pull[bot] committed Jan 19, 2022
1 parent 67a4ebb commit ea622a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions src/transport/raw/tests/TestTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@ class MockTransportMgrDelegate : public chip::TransportMgrDelegate

// Should be able to send a message to itself by just calling send.
err = tcp.SendMessage(Transport::PeerAddress::TCP(addr), std::move(buffer));
if (err == CHIP_ERROR_POSIX(EADDRNOTAVAIL))
{
// TODO(#2698): the underlying system does not support IPV6. This early return
// should be removed and error should be made fatal.
printf("%s:%u: System does NOT support IPV6.\n", __FILE__, __LINE__);
return;
}

NL_TEST_ASSERT(mSuite, err == CHIP_NO_ERROR);

mContext.DriveIOUntil(chip::System::Clock::Seconds16(5), [this]() { return mReceiveHandlerCallCount != 0; });
Expand Down
8 changes: 0 additions & 8 deletions src/transport/raw/tests/TestUDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,6 @@ void CheckMessageTest(nlTestSuite * inSuite, void * inContext, const IPAddress &

// Should be able to send a message to itself by just calling send.
err = udp.SendMessage(Transport::PeerAddress::UDP(addr, udp.GetBoundPort()), std::move(buffer));
if (err == CHIP_ERROR_POSIX(EADDRNOTAVAIL))
{
// TODO(#2698): the underlying system does not support IPV6. This early return
// should be removed and error should be made fatal.
printf("%s:%u: System does NOT support IPV6.\n", __FILE__, __LINE__);
return;
}

NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);

ctx.DriveIOUntil(chip::System::Clock::Seconds16(1), []() { return ReceiveHandlerCallCount != 0; });
Expand Down

0 comments on commit ea622a1

Please sign in to comment.