From 2d4cca0a82dbf2e9ca11f3cb59cbf8147b75677a Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Fri, 7 Jul 2023 06:23:37 +0100 Subject: [PATCH] Removed the failure on init test as it may have been causing seg faults in some tests. --- src/app/tests/TestAttributePersistenceProvider.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/tests/TestAttributePersistenceProvider.cpp b/src/app/tests/TestAttributePersistenceProvider.cpp index c451dc648422dd..9a19a725ffd75b 100644 --- a/src/app/tests/TestAttributePersistenceProvider.cpp +++ b/src/app/tests/TestAttributePersistenceProvider.cpp @@ -63,17 +63,13 @@ void TestStorageAndRetrivalByteSpans(nlTestSuite * inSuite, void * inContext) TestPersistentStorageDelegate storageDelegate; DefaultAttributePersistenceProvider persistenceProvider; - // Failure before Init - uint8_t valueArray[1] = { 0x42 }; - ByteSpan value(valueArray); - CHIP_ERROR err = persistenceProvider.WriteValue(TestConcretePath, value); - NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INCORRECT_STATE); - // Init - err = persistenceProvider.Init(&storageDelegate); + ChipError err = persistenceProvider.Init(&storageDelegate); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); // Store ByteSpan of size 1 + uint8_t valueArray[1] = { 0x42 }; + ByteSpan value(valueArray); err = persistenceProvider.WriteValue(TestConcretePath, value); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR);