diff options
author | Liu, Zhiguang <Zhiguang.Liu@intel.com> | 2022-12-06 13:25:43 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-14 13:34:33 +0000 |
commit | 1cd902f1f468500eac6c90a13cbf49a5db4ef32e (patch) | |
tree | ac68d9c7a194c8a3ef6b262e43a80f80c84ec57a /UnitTestFrameworkPkg/Library/UnitTestLib | |
parent | e986f4ce969e8d95a966dd2f19a3559b336e48f5 (diff) | |
download | edk2-1cd902f1f468500eac6c90a13cbf49a5db4ef32e.zip edk2-1cd902f1f468500eac6c90a13cbf49a5db4ef32e.tar.gz edk2-1cd902f1f468500eac6c90a13cbf49a5db4ef32e.tar.bz2 |
UnitTestFrameworkPkg: Modify APIs in UnitTestPersistenceLib
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4183
UnitTestPersistenceLib now consumes private struct definition.
Modify APIs in UnitTestPersistenceLib to make it easy to become
a public library.
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UnitTestFrameworkPkg/Library/UnitTestLib')
-rw-r--r-- | UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c index 64d5880..5b442ed 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c @@ -2,6 +2,7 @@ Implement UnitTestLib
Copyright (c) Microsoft Corporation.
+ Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -210,6 +211,7 @@ InitUnitTestFramework ( EFI_STATUS Status;
UNIT_TEST_FRAMEWORK_HANDLE NewFrameworkHandle;
UNIT_TEST_FRAMEWORK *NewFramework;
+ UINTN SaveStateSize;
Status = EFI_SUCCESS;
NewFramework = NULL;
@@ -267,7 +269,7 @@ InitUnitTestFramework ( // If there is a persisted context, load it now.
//
if (DoesCacheExist (NewFrameworkHandle)) {
- Status = LoadUnitTestCache (NewFrameworkHandle, (UNIT_TEST_SAVE_HEADER **)(&NewFramework->SavedState));
+ Status = LoadUnitTestCache (NewFrameworkHandle, (VOID **)(&NewFramework->SavedState), &SaveStateSize);
if (EFI_ERROR (Status)) {
//
// Don't actually report it as an error, but emit a warning.
@@ -852,7 +854,7 @@ SaveFrameworkState ( //
// All that should be left to do is save it using the associated persistence lib.
//
- Status = SaveUnitTestCache (FrameworkHandle, Header);
+ Status = SaveUnitTestCache (FrameworkHandle, Header, Header->SaveStateSize);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a - Could not save state! %r\n", __FUNCTION__, Status));
Status = EFI_DEVICE_ERROR;
|