From 8118676a2809ba3e2e33658b386da50c673a8c4d Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 10 May 2023 08:50:13 +0200 Subject: [PATCH] Initialize memory before running schedule lambda test (#26446) --- src/system/tests/TestSystemScheduleLambda.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/system/tests/TestSystemScheduleLambda.cpp b/src/system/tests/TestSystemScheduleLambda.cpp index 9dd78829bb4ff5..1826bec5e0619c 100644 --- a/src/system/tests/TestSystemScheduleLambda.cpp +++ b/src/system/tests/TestSystemScheduleLambda.cpp @@ -67,9 +67,10 @@ static nlTestSuite kTheSuite = */ static int TestSetup(void * aContext) { + if (chip::Platform::MemoryInit() != CHIP_NO_ERROR) + return FAILURE; if (chip::DeviceLayer::PlatformMgr().InitChipStack() != CHIP_NO_ERROR) return FAILURE; - return (SUCCESS); } @@ -80,6 +81,7 @@ static int TestSetup(void * aContext) static int TestTeardown(void * aContext) { chip::DeviceLayer::PlatformMgr().Shutdown(); + chip::Platform::MemoryShutdown(); return (SUCCESS); }