Skip to content

Commit 5407248

Browse files
authored
Merge branch 'master' into feature/basic-app-install-flow
2 parents 33b5912 + 878fbb7 commit 5407248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+271
-257
lines changed

config/esp32/components/chip/Kconfig

+6-6
Original file line numberDiff line numberDiff line change
@@ -1232,47 +1232,47 @@ menu "CHIP Device Layer"
12321232
menu "Message Reliable Protocol Options"
12331233
config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_THREAD
12341234
int "MRP local active retry interval for Thread network in milliseconds"
1235-
depends on OPENTHREAD_ENABLED
1235+
depends on ENABLE_MATTER_OVER_THREAD
12361236
range 0 3600000
12371237
default 800
12381238
help
12391239
Base retry interval of the present Thread node when it is in the active state.
12401240

12411241
config MRP_LOCAL_ACTIVE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
12421242
int "MRP local active retry interval for WIFI or ETHERNET network in milliseconds"
1243-
depends on !OPENTHREAD_ENABLED
1243+
depends on !ENABLE_MATTER_OVER_THREAD
12441244
range 0 3600000
12451245
default 300
12461246
help
12471247
Base retry interval of the present node (WIFI or ETHERNET) when it is in the active state.
12481248

12491249
config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_THREAD
12501250
int "MRP local idle retry interval for Thread network in milliseconds"
1251-
depends on OPENTHREAD_ENABLED
1251+
depends on ENABLE_MATTER_OVER_THREAD
12521252
range 0 3600000
12531253
default 800
12541254
help
12551255
Base retry interval of the present Thread node when it is in the idle state.
12561256

12571257
config MRP_LOCAL_IDLE_RETRY_INTERVAL_FOR_WIFI_ETHERNET
12581258
int "MRP local idle retry interval for WIFI or ETHERNET network in milliseconds"
1259-
depends on !OPENTHREAD_ENABLED
1259+
depends on !ENABLE_MATTER_OVER_THREAD
12601260
range 0 3600000
12611261
default 500
12621262
help
12631263
Base retry interval of the present node (WIFI or ETHERNET) when it is in the idle state.
12641264

12651265
config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_THREAD
12661266
int "MRP retransmission delta timeout for Thread network in milliseconds"
1267-
depends on OPENTHREAD_ENABLED
1267+
depends on ENABLE_MATTER_OVER_THREAD
12681268
range 0 3600000
12691269
default 500
12701270
help
12711271
A constant value added to the calculated retransmission timeout.
12721272

12731273
config MRP_RETRY_INTERVAL_SENDER_BOOST_FOR_WIFI_ETHERNET
12741274
int "MRP retransmission delta timeout for WIFI or ETHERNET network in milliseconds"
1275-
depends on !OPENTHREAD_ENABLED
1275+
depends on !ENABLE_MATTER_OVER_THREAD
12761276
range 0 3600000
12771277
default 0
12781278
help

examples/platform/silabs/FreeRTOSConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
197197
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48
198198
#endif // SLI_SI91X_MCU_INTERFACE
199199

200-
#define configENABLE_FPU 0
200+
#define configENABLE_FPU 1
201201
#define configENABLE_MPU 0
202202
/* FreeRTOS Secure Side Only and TrustZone Security Extension */
203203
#define configRUN_FREERTOS_SECURE_ONLY 1

src/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ if (chip_build_tests) {
9292
]
9393
}
9494

95+
# Skip on efr32 due to flash and/or ram limitations.
9596
if (chip_device_platform != "efr32") {
9697
tests += [
97-
# TODO(#10447): App test has HF on EFR32.
9898
"${chip_root}/src/app/tests",
9999
"${chip_root}/src/credentials/tests",
100100
"${chip_root}/src/lib/format/tests",
@@ -128,7 +128,7 @@ if (chip_build_tests) {
128128
# https://github.com/project-chip/connectedhomeip/issues/9630
129129
if (chip_device_platform != "nrfconnect" &&
130130
chip_device_platform != "efr32") {
131-
# TODO(#10447): Controller test has HF on EFR32.
131+
# Doesn't compile on ef32. Multiple definitions issues with attribute storage and overflows flash memory.
132132
tests += [ "${chip_root}/src/controller/tests/data_model" ]
133133

134134
# Skip controller test for Open IoT SDK

src/app/icd/server/tests/TestICDManager.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -1061,10 +1061,15 @@ TEST_F(TestICDManager, TestICDStateObserverOnTransitionToIdleModeEqualActiveMode
10611061

10621062
// Expire IdleMode timer
10631063
AdvanceClockAndRunEventLoop(1_s);
1064-
EXPECT_FALSE(mICDStateObserver.mOnTransitionToIdleCalled);
1064+
// In this scenario, The ICD state machine kicked a OnTransitionToIdle timer with a duration of 0 seconds.
1065+
// The freeRTOS systemlayer timer calls a 0s timer's callback instantly while on posix it take and 1 addition event loop.
1066+
// Thefore, the expect result diverges here based on the systemlayer implementation. Skip this check.
1067+
// https://github.com/project-chip/connectedhomeip/issues/33441
1068+
// EXPECT_FALSE(mICDStateObserver.mOnTransitionToIdleCalled);
10651069

10661070
// Expire OnTransitionToIdleMode
10671071
AdvanceClockAndRunEventLoop(1_ms32);
1072+
// All systems should have called the OnTransitionToIdle callback by now.
10681073
EXPECT_TRUE(mICDStateObserver.mOnTransitionToIdleCalled);
10691074

10701075
// Reset Old durations

src/app/tests/AppTestContext.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class AppContext : public LoopbackMessagingContext
2828
{
2929
public:
3030
// Performs shared setup for all tests in the test suite
31-
void SetUpTestSuite() override;
31+
static void SetUpTestSuite();
3232
// Performs shared teardown for all tests in the test suite
33-
void TearDownTestSuite() override;
33+
static void TearDownTestSuite();
3434
// Performs setup for each individual test in the test suite
35-
void SetUp() override;
35+
void SetUp();
3636
// Performs teardown for each individual test in the test suite
37-
void TearDown() override;
37+
void TearDown();
3838
};
3939

4040
} // namespace Test

src/app/tests/TestAclAttribute.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ const nlTest sTests[] = {
259259
nlTestSuite sSuite = {
260260
"TestAclAttribute",
261261
&sTests[0],
262-
TestAccessContext::nlTestSetUpTestSuite,
263-
TestAccessContext::nlTestTearDownTestSuite,
264-
TestAccessContext::nlTestSetUp,
265-
TestAccessContext::nlTestTearDown,
262+
NL_TEST_WRAP_FUNCTION(TestAccessContext::SetUpTestSuite),
263+
NL_TEST_WRAP_FUNCTION(TestAccessContext::TearDownTestSuite),
264+
NL_TEST_WRAP_METHOD(TestAccessContext, SetUp),
265+
NL_TEST_WRAP_METHOD(TestAccessContext, TearDown),
266266
};
267267

268268
} // namespace

src/app/tests/TestAclEvent.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,10 @@ nlTestSuite sSuite =
377377
{
378378
"TestAclEvent",
379379
&sTests[0],
380-
TestContext::nlTestSetUpTestSuite,
381-
TestContext::nlTestTearDownTestSuite,
382-
TestContext::nlTestSetUp,
383-
TestContext::nlTestTearDown,
380+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
381+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
382+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
383+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
384384
};
385385
// clang-format on
386386

src/app/tests/TestBufferedReadCallback.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,10 @@ nlTestSuite theSuite =
610610
{
611611
"TestBufferedReadCallback",
612612
&sTests[0],
613-
TestContext::nlTestSetUpTestSuite,
614-
TestContext::nlTestTearDownTestSuite,
615-
TestContext::nlTestSetUp,
616-
TestContext::nlTestTearDown,
613+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
614+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
615+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
616+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
617617
};
618618

619619
}

src/app/tests/TestClusterStateCache.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@ nlTestSuite theSuite =
695695
{
696696
"TestClusterStateCache",
697697
&sTests[0],
698-
TestContext::nlTestSetUpTestSuite,
699-
TestContext::nlTestTearDownTestSuite,
700-
TestContext::nlTestSetUp,
701-
TestContext::nlTestTearDown,
698+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
699+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
700+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
701+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
702702
};
703703

704704
}

src/app/tests/TestCommandInteraction.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -2120,10 +2120,10 @@ nlTestSuite sSuite =
21202120
{
21212121
"TestCommandInteraction",
21222122
&sTests[0],
2123-
TestContext::nlTestSetUpTestSuite,
2124-
TestContext::nlTestTearDownTestSuite,
2125-
TestContext::nlTestSetUp,
2126-
TestContext::nlTestTearDown,
2123+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
2124+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
2125+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
2126+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
21272127
};
21282128
// clang-format on
21292129

src/app/tests/TestEventLogging.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ const nlTest sTests[] = {
318318
nlTestSuite sSuite = {
319319
"EventLogging",
320320
&sTests[0],
321-
TestContext::nlTestSetUpTestSuite,
322-
TestContext::nlTestTearDownTestSuite,
323-
TestContext::nlTestSetUp,
324-
TestContext::nlTestTearDown,
321+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
322+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
323+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
324+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
325325
};
326326

327327
} // namespace

src/app/tests/TestEventLoggingNoUTCTime.cpp

+11-9
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ class TestContext : public chip::Test::AppContext
8484
{
8585
public:
8686
// Performs shared setup for all tests in the test suite
87-
void SetUpTestSuite() override
87+
static void SetUpTestSuite()
8888
{
8989
chip::Test::AppContext::SetUpTestSuite();
90-
mClock.Emplace(chip::System::SystemClock());
90+
sClock.Emplace(chip::System::SystemClock());
9191
}
9292

9393
// Performs shared teardown for all tests in the test suite
94-
void TearDownTestSuite() override
94+
static void TearDownTestSuite()
9595
{
96-
mClock.ClearValue();
96+
sClock.ClearValue();
9797
chip::Test::AppContext::TearDownTestSuite();
9898
}
9999

@@ -125,9 +125,11 @@ class TestContext : public chip::Test::AppContext
125125

126126
private:
127127
chip::MonotonicallyIncreasingCounter<chip::EventNumber> mEventCounter;
128-
chip::Optional<MockClock> mClock;
128+
static chip::Optional<MockClock> sClock;
129129
};
130130

131+
chip::Optional<MockClock> TestContext::sClock;
132+
131133
void ENFORCE_FORMAT(1, 2) SimpleDumpWriter(const char * aFormat, ...)
132134
{
133135
va_list args;
@@ -370,10 +372,10 @@ const nlTest sTests[] = {
370372
nlTestSuite sSuite = {
371373
"EventLogging",
372374
&sTests[0],
373-
TestContext::nlTestSetUpTestSuite,
374-
TestContext::nlTestTearDownTestSuite,
375-
TestContext::nlTestSetUp,
376-
TestContext::nlTestTearDown,
375+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
376+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
377+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
378+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
377379
};
378380

379381
} // namespace

src/app/tests/TestEventOverflow.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ nlTestSuite sSuite =
169169
{
170170
"TestEventOverflow",
171171
&sTests[0],
172-
TestContext::nlTestSetUpTestSuite,
173-
TestContext::nlTestTearDownTestSuite,
174-
TestContext::nlTestSetUp,
175-
TestContext::nlTestTearDown,
172+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
173+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
174+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
175+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
176176
};
177177
// clang-format on
178178

src/app/tests/TestFabricScopedEventLogging.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ nlTestSuite sSuite =
278278
{
279279
"TestFabricScopedEventLogging",
280280
&sTests[0],
281-
TestContext::nlTestSetUpTestSuite,
282-
TestContext::nlTestTearDownTestSuite,
283-
TestContext::nlTestSetUp,
284-
TestContext::nlTestTearDown,
281+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
282+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
283+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
284+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
285285
};
286286
// clang-format on
287287

src/app/tests/TestInteractionModelEngine.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,10 @@ nlTestSuite sSuite =
773773
{
774774
"TestInteractionModelEngine",
775775
&sTests[0],
776-
TestContext::nlTestSetUpTestSuite,
777-
TestContext::nlTestTearDownTestSuite,
778-
TestContext::nlTestSetUp,
779-
TestContext::nlTestTearDown,
776+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
777+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
778+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
779+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
780780
};
781781
// clang-format on
782782

src/app/tests/TestReadInteraction.cpp

+25-19
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ class TestContext : public chip::Test::AppContext
7979
{
8080
public:
8181
// Performs shared setup for all tests in the test suite
82-
void SetUpTestSuite() override
82+
static void SetUpTestSuite()
8383
{
8484
chip::Test::AppContext::SetUpTestSuite();
8585
gRealClock = &chip::System::SystemClock();
8686
chip::System::Clock::Internal::SetSystemClockForTesting(&gMockClock);
8787

88-
if (mSyncScheduler)
88+
if (sSyncScheduler)
8989
{
9090
gReportScheduler = chip::app::reporting::GetSynchronizedReportScheduler();
9191
sUsingSubSync = true;
@@ -96,14 +96,8 @@ class TestContext : public chip::Test::AppContext
9696
}
9797
}
9898

99-
static int nlTestSetUpTestSuite_Sync(void * context)
100-
{
101-
static_cast<TestContext *>(context)->mSyncScheduler = true;
102-
return nlTestSetUpTestSuite(context);
103-
}
104-
10599
// Performs shared teardown for all tests in the test suite
106-
void TearDownTestSuite() override
100+
static void TearDownTestSuite()
107101
{
108102
chip::System::Clock::Internal::SetSystemClockForTesting(gRealClock);
109103
chip::Test::AppContext::TearDownTestSuite();
@@ -133,9 +127,21 @@ class TestContext : public chip::Test::AppContext
133127
chip::Test::AppContext::TearDown();
134128
}
135129

136-
private:
130+
protected:
137131
chip::MonotonicallyIncreasingCounter<chip::EventNumber> mEventCounter;
138-
bool mSyncScheduler = false;
132+
static bool sSyncScheduler;
133+
};
134+
135+
bool TestContext::sSyncScheduler = false;
136+
137+
class TestSyncContext : public TestContext
138+
{
139+
public:
140+
static void SetUpTestSuite()
141+
{
142+
sSyncScheduler = true;
143+
TestContext::SetUpTestSuite();
144+
}
139145
};
140146

141147
class TestEventGenerator : public chip::app::EventLoggingDelegate
@@ -5146,19 +5152,19 @@ const nlTest sTests[] = {
51465152
nlTestSuite sSuite = {
51475153
"TestReadInteraction",
51485154
&sTests[0],
5149-
TestContext::nlTestSetUpTestSuite,
5150-
TestContext::nlTestTearDownTestSuite,
5151-
TestContext::nlTestSetUp,
5152-
TestContext::nlTestTearDown,
5155+
NL_TEST_WRAP_FUNCTION(TestContext::SetUpTestSuite),
5156+
NL_TEST_WRAP_FUNCTION(TestContext::TearDownTestSuite),
5157+
NL_TEST_WRAP_METHOD(TestContext, SetUp),
5158+
NL_TEST_WRAP_METHOD(TestContext, TearDown),
51535159
};
51545160

51555161
nlTestSuite sSyncSuite = {
51565162
"TestSyncReadInteraction",
51575163
&sTests[0],
5158-
TestContext::nlTestSetUpTestSuite_Sync,
5159-
TestContext::nlTestTearDownTestSuite,
5160-
TestContext::nlTestSetUp,
5161-
TestContext::nlTestTearDown,
5164+
NL_TEST_WRAP_FUNCTION(TestSyncContext::SetUpTestSuite),
5165+
NL_TEST_WRAP_FUNCTION(TestSyncContext::TearDownTestSuite),
5166+
NL_TEST_WRAP_METHOD(TestSyncContext, SetUp),
5167+
NL_TEST_WRAP_METHOD(TestSyncContext, TearDown),
51625168
};
51635169

51645170
} // namespace

0 commit comments

Comments
 (0)