diff options
| author | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
|---|---|---|
| committer | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
| commit | 7e2ccccace24636f29ddc210b94606abd4c7e42b (patch) | |
| tree | 545d43ea12671048956cafeb12303e84d601e571 /UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h | |
| parent | 27b044605cd5f6b33a3d231576003850b3fe305b (diff) | |
| download | edk2-trunk.tar.xz | |
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h')
| -rw-r--r-- | UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h | 160 |
1 files changed, 80 insertions, 80 deletions
diff --git a/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h b/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h index 5543b79a0d..59486a2af3 100644 --- a/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h +++ b/UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h @@ -1,80 +1,80 @@ -/** @file
- This header file describes a library that contains functions to save and
- restore unit test internal state, in case the test needs to pause and resume
- (eg. a reboot-based test).
-
- Copyright (c) Microsoft Corporation.<BR>
- Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.<BR>
- SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef _UNIT_TEST_PERSISTENCE_LIB_H_
-#define _UNIT_TEST_PERSISTENCE_LIB_H_
-
-#include <Library/UnitTestLib.h>
-
-#define UNIT_TEST_PERSISTENCE_LIB_VERSION 1
-
-/**
- Determines whether a persistence cache already exists for
- the given framework.
-
- @param[in] FrameworkHandle A pointer to the framework that is being persisted.
-
- @retval TRUE
- @retval FALSE Cache doesn't exist or an error occurred.
-
-**/
-BOOLEAN
-EFIAPI
-DoesCacheExist (
- IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle
- );
-
-/**
- Will save the data associated with an internal Unit Test Framework
- state in a manner that can persist a Unit Test Application quit or
- even a system reboot.
-
- @param[in] FrameworkHandle A pointer to the framework that is being persisted.
- @param[in] SaveData A pointer to the buffer containing the serialized
- framework internal state.
- @param[in] SaveStateSize The size of SaveData in bytes.
-
- @retval EFI_SUCCESS Data is persisted and the test can be safely quit.
- @retval Others Data is not persisted and test cannot be resumed upon exit.
-
-**/
-EFI_STATUS
-EFIAPI
-SaveUnitTestCache (
- IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle,
- IN VOID *SaveData,
- IN UINTN SaveStateSize
- );
-
-/**
- Will retrieve any cached state associated with the given framework.
- Will allocate a buffer to hold the loaded data.
-
- @param[in] FrameworkHandle A pointer to the framework that is being persisted.
- @param[out] SaveData A pointer pointer that will be updated with the address
- of the loaded data buffer.
- @param[out] SaveStateSize Return the size of SaveData in bytes.
-
- @retval EFI_SUCCESS Data has been loaded successfully and SaveData is updated
- with a pointer to the buffer.
- @retval Others An error has occurred and no data has been loaded. SaveData
- is set to NULL.
-
-**/
-EFI_STATUS
-EFIAPI
-LoadUnitTestCache (
- IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle,
- OUT VOID **SaveData,
- OUT UINTN *SaveStateSize
- );
-
-#endif
+/** @file + This header file describes a library that contains functions to save and + restore unit test internal state, in case the test needs to pause and resume + (eg. a reboot-based test). + + Copyright (c) Microsoft Corporation.<BR> + Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _UNIT_TEST_PERSISTENCE_LIB_H_ +#define _UNIT_TEST_PERSISTENCE_LIB_H_ + +#include <Library/UnitTestLib.h> + +#define UNIT_TEST_PERSISTENCE_LIB_VERSION 1 + +/** + Determines whether a persistence cache already exists for + the given framework. + + @param[in] FrameworkHandle A pointer to the framework that is being persisted. + + @retval TRUE + @retval FALSE Cache doesn't exist or an error occurred. + +**/ +BOOLEAN +EFIAPI +DoesCacheExist ( + IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle + ); + +/** + Will save the data associated with an internal Unit Test Framework + state in a manner that can persist a Unit Test Application quit or + even a system reboot. + + @param[in] FrameworkHandle A pointer to the framework that is being persisted. + @param[in] SaveData A pointer to the buffer containing the serialized + framework internal state. + @param[in] SaveStateSize The size of SaveData in bytes. + + @retval EFI_SUCCESS Data is persisted and the test can be safely quit. + @retval Others Data is not persisted and test cannot be resumed upon exit. + +**/ +EFI_STATUS +EFIAPI +SaveUnitTestCache ( + IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, + IN VOID *SaveData, + IN UINTN SaveStateSize + ); + +/** + Will retrieve any cached state associated with the given framework. + Will allocate a buffer to hold the loaded data. + + @param[in] FrameworkHandle A pointer to the framework that is being persisted. + @param[out] SaveData A pointer pointer that will be updated with the address + of the loaded data buffer. + @param[out] SaveStateSize Return the size of SaveData in bytes. + + @retval EFI_SUCCESS Data has been loaded successfully and SaveData is updated + with a pointer to the buffer. + @retval Others An error has occurred and no data has been loaded. SaveData + is set to NULL. + +**/ +EFI_STATUS +EFIAPI +LoadUnitTestCache ( + IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, + OUT VOID **SaveData, + OUT UINTN *SaveStateSize + ); + +#endif |
