Implement UnitTestLib\r
\r
Copyright (c) Microsoft Corporation.\r
+ Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
EFI_STATUS Status;\r
UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle;\r
UNIT_TEST_FRAMEWORK *NewFramework;\r
+ UINTN SaveStateSize;\r
\r
Status = EFI_SUCCESS;\r
NewFramework = NULL;\r
// If there is a persisted context, load it now.\r
//\r
if (DoesCacheExist (NewFrameworkHandle)) {\r
- Status = LoadUnitTestCache (NewFrameworkHandle, (UNIT_TEST_SAVE_HEADER **)(&NewFramework->SavedState));\r
+ Status = LoadUnitTestCache (NewFrameworkHandle, (VOID **)(&NewFramework->SavedState), &SaveStateSize);\r
if (EFI_ERROR (Status)) {\r
//\r
// Don't actually report it as an error, but emit a warning.\r
//\r
// All that should be left to do is save it using the associated persistence lib.\r
//\r
- Status = SaveUnitTestCache (FrameworkHandle, Header);\r
+ Status = SaveUnitTestCache (FrameworkHandle, Header, Header->SaveStateSize);\r
if (EFI_ERROR (Status)) {\r
DEBUG ((DEBUG_ERROR, "%a - Could not save state! %r\n", __FUNCTION__, Status));\r
Status = EFI_DEVICE_ERROR;\r