From 38003d6a7b2727b559397f6c41ab11567990103e Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 14 Nov 2022 07:46:56 -0800 Subject: [PATCH] Fix TestInetEndPoint failure on GCP cloudbuild (#23584) --- src/inet/tests/TestInetEndPoint.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/inet/tests/TestInetEndPoint.cpp b/src/inet/tests/TestInetEndPoint.cpp index 1e4ef41b8997d3..09aeba6bf3ae13 100644 --- a/src/inet/tests/TestInetEndPoint.cpp +++ b/src/inet/tests/TestInetEndPoint.cpp @@ -265,6 +265,13 @@ static void TestInetEndPointInternal(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, SYSTEM_STATS_TEST_IN_USE(System::Stats::kInetLayer_NumUDPEps, 1)); err = InterfaceId::Null().GetLinkLocalAddr(&addr); + + // We should skip the following checks if the interface does not have the Link local address + if (err == INET_ERROR_ADDRESS_NOT_FOUND) + { + return; + } + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); intId = InterfaceId::FromIPAddress(addr); NL_TEST_ASSERT(inSuite, intId.IsPresent());