TianoCore EDK2 master
Loading...
Searching...
No Matches
DxePrmContextBufferLibUnitTest.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <Uefi.h>
#include <Guid/ZeroGuid.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrintLib.h>
#include <Library/PrmContextBufferLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UnitTestLib.h>
#include <Protocol/PrmConfig.h>

Go to the source code of this file.

Data Structures

struct  PRM_CONTEXT_BUFFERS_TEST_CONTEXT
 
struct  PRM_CONTEXT_BUFFER_TEST_CONTEXT
 

Macros

#define UNIT_TEST_NAME   "PRM Context Buffer Library Unit Test"
 
#define UNIT_TEST_VERSION   "0.1"
 
#define HANDLER_TEST_GUID_1   {0x52960b90, 0x2f3a, 0x4917, { 0xb9, 0x1a, 0xed, 0x5f, 0x59, 0x9a, 0x88, 0x09 }}
 
#define HANDLER_TEST_GUID_2   {0x9316a80d, 0x06dc, 0x417b, { 0xb2, 0x1d, 0x6b, 0x3c, 0x2a, 0xe4, 0xed, 0x6f }}
 
#define HANDLER_TEST_GUID_3   {0xd32ac8ba, 0x6cc6, 0x456f, { 0x9e, 0xd9, 0x92, 0x33, 0xfa, 0x31, 0x04, 0x34 }}
 
#define MODULE_TEST_GUID_1   {0xfaadaa95, 0x070b, 0x4a34, { 0xa9, 0x19, 0x18, 0x30, 0x5d, 0xc0, 0x73, 0x70 }}
 
#define MODULE_TEST_GUID_2   {0x0ea24584, 0x731c, 0x4863, { 0x91, 0x00, 0x75, 0x78, 0x0a, 0xf5, 0x09, 0xa7 }}
 
#define MODULE_TEST_GUID_3   {0xf456b7a1, 0x82a6, 0x4427, { 0x84, 0x86, 0x87, 0xe3, 0xa6, 0x02, 0xdf, 0x43 }}
 
#define NEGATIVE_TEST_GUID   {0x4a941a9c, 0x9dcf, 0x471b, {0x94, 0xb5, 0xd9, 0xe2, 0xd8, 0xc6, 0x4a, 0x1b }}
 

Functions

UNIT_TEST_STATUS EFIAPI NullPointerArgumentsShouldFailGracefully (IN UNIT_TEST_CONTEXT Context)
 === HELPER FUNCTIONS ===========================================================================
 
STATIC UNIT_TEST_STATUS EFIAPI InitializeFunctionalCorrectness (IN UNIT_TEST_CONTEXT Context)
 ===== FUNCTIONAL CORRECTNESS SUITE ==================================================
 
STATIC VOID EFIAPI DeInitializeFunctionalCorrectness (IN UNIT_TEST_CONTEXT Context)
 
UNIT_TEST_STATUS EFIAPI VerifyGetModuleContextBuffers (IN UNIT_TEST_CONTEXT Context)
 
UNIT_TEST_STATUS EFIAPI VerifyFindContextBufferInModuleBuffers (IN UNIT_TEST_CONTEXT Context)
 
UNIT_TEST_STATUS EFIAPI VerifyGetContextBuffer (IN UNIT_TEST_CONTEXT Context)
 
int main ()
 === TEST ENGINE ================================================================================
 

Variables

EFI_HANDLE mTestProtocolHandle
 === TEST DATA ==================================================================================
 
EFI_GUID mHandlerTestGuid1 = HANDLER_TEST_GUID_1
 
EFI_GUID mHandlerTestGuid2 = HANDLER_TEST_GUID_2
 
EFI_GUID mHandlerTestGuid3 = HANDLER_TEST_GUID_3
 
EFI_GUID mModuleTestGuid1 = MODULE_TEST_GUID_1
 
EFI_GUID mModuleTestGuid2 = MODULE_TEST_GUID_2
 
EFI_GUID mModuleTestGuid3 = MODULE_TEST_GUID_3
 
EFI_GUID mNegativeTestGuid = NEGATIVE_TEST_GUID
 
PRM_DATA_BUFFER mTestStaticDataBuffer1
 
PRM_CONTEXT_BUFFER mTestPrmContextBuffer1
 
PRM_CONTEXT_BUFFER mTestPrmContextBuffer2 [2]
 
PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers1
 
PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers2
 
PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers3
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers00 = { &mTestPrmModuleContextBuffers1, NULL, ByModuleGuid, &mModuleTestGuid1, &mModuleTestGuid1, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers01 = { &mTestPrmModuleContextBuffers2, NULL, ByModuleGuid, &mModuleTestGuid2, &mModuleTestGuid2, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers02 = { &mTestPrmModuleContextBuffers3, NULL, ByModuleGuid, &mModuleTestGuid3, &mModuleTestGuid3, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers03 = { &mTestPrmModuleContextBuffers3, NULL, ByModuleGuid, &mNegativeTestGuid, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers04 = { &mTestPrmModuleContextBuffers1, NULL, ByModuleGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers05 = { &mTestPrmModuleContextBuffers1, NULL, ByHandlerGuid, &mHandlerTestGuid1, &mModuleTestGuid1, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers06 = { &mTestPrmModuleContextBuffers1, NULL, ByHandlerGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers07 = { &mTestPrmModuleContextBuffers2, NULL, ByHandlerGuid, &mHandlerTestGuid1, &mModuleTestGuid2, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers08 = { &mTestPrmModuleContextBuffers2, NULL, ByHandlerGuid, &mNegativeTestGuid, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers09 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid1, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers10 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid2, &mModuleTestGuid3, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers11 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid3, &mModuleTestGuid3, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers12 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFERS_TEST_CONTEXTmContextBuffersArray []
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer00 = { &mHandlerTestGuid1, &mTestPrmModuleContextBuffers1, &mTestPrmContextBuffer1, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer01 = { &mHandlerTestGuid1, &mTestPrmModuleContextBuffers2, &mTestPrmContextBuffer1, EFI_SUCCESS }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer02 = { &mHandlerTestGuid2, &mTestPrmModuleContextBuffers3, &mTestPrmContextBuffer2[0], EFI_SUCCESS }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer03 = { &mHandlerTestGuid3, &mTestPrmModuleContextBuffers3, &mTestPrmContextBuffer2[1], EFI_SUCCESS }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer04 = { &mNegativeTestGuid, &mTestPrmModuleContextBuffers1, NULL, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer05 = { &gZeroGuid, &mTestPrmModuleContextBuffers3, NULL, EFI_NOT_FOUND }
 
PRM_CONTEXT_BUFFER_TEST_CONTEXTmContextBufferArray []
 

Detailed Description

Unit tests for the PRM Context Buffer Library.

Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DxePrmContextBufferLibUnitTest.c.

Macro Definition Documentation

◆ HANDLER_TEST_GUID_1

#define HANDLER_TEST_GUID_1   {0x52960b90, 0x2f3a, 0x4917, { 0xb9, 0x1a, 0xed, 0x5f, 0x59, 0x9a, 0x88, 0x09 }}

Definition at line 61 of file DxePrmContextBufferLibUnitTest.c.

◆ HANDLER_TEST_GUID_2

#define HANDLER_TEST_GUID_2   {0x9316a80d, 0x06dc, 0x417b, { 0xb2, 0x1d, 0x6b, 0x3c, 0x2a, 0xe4, 0xed, 0x6f }}

Definition at line 65 of file DxePrmContextBufferLibUnitTest.c.

◆ HANDLER_TEST_GUID_3

#define HANDLER_TEST_GUID_3   {0xd32ac8ba, 0x6cc6, 0x456f, { 0x9e, 0xd9, 0x92, 0x33, 0xfa, 0x31, 0x04, 0x34 }}

Definition at line 69 of file DxePrmContextBufferLibUnitTest.c.

◆ MODULE_TEST_GUID_1

#define MODULE_TEST_GUID_1   {0xfaadaa95, 0x070b, 0x4a34, { 0xa9, 0x19, 0x18, 0x30, 0x5d, 0xc0, 0x73, 0x70 }}

Definition at line 73 of file DxePrmContextBufferLibUnitTest.c.

◆ MODULE_TEST_GUID_2

#define MODULE_TEST_GUID_2   {0x0ea24584, 0x731c, 0x4863, { 0x91, 0x00, 0x75, 0x78, 0x0a, 0xf5, 0x09, 0xa7 }}

Definition at line 77 of file DxePrmContextBufferLibUnitTest.c.

◆ MODULE_TEST_GUID_3

#define MODULE_TEST_GUID_3   {0xf456b7a1, 0x82a6, 0x4427, { 0x84, 0x86, 0x87, 0xe3, 0xa6, 0x02, 0xdf, 0x43 }}

Definition at line 81 of file DxePrmContextBufferLibUnitTest.c.

◆ NEGATIVE_TEST_GUID

#define NEGATIVE_TEST_GUID   {0x4a941a9c, 0x9dcf, 0x471b, {0x94, 0xb5, 0xd9, 0xe2, 0xd8, 0xc6, 0x4a, 0x1b }}

Definition at line 85 of file DxePrmContextBufferLibUnitTest.c.

◆ UNIT_TEST_NAME

#define UNIT_TEST_NAME   "PRM Context Buffer Library Unit Test"

Definition at line 30 of file DxePrmContextBufferLibUnitTest.c.

◆ UNIT_TEST_VERSION

#define UNIT_TEST_VERSION   "0.1"

Definition at line 31 of file DxePrmContextBufferLibUnitTest.c.

Function Documentation

◆ DeInitializeFunctionalCorrectness()

STATIC VOID EFIAPI DeInitializeFunctionalCorrectness ( IN UNIT_TEST_CONTEXT  Context)

Functional Correctness cleanup function.

Uninstalls the gPrmConfigProtocolGuid protocol instance as specified by the provided context. This is used to clean up the mocked protocol database after unit test execution.

Parameters
[in]Context[Optional] An optional parameter that enables: A pointer to a PRM_CONTEXT_BUFFERS_TEST_CONTEXT structure with context information for this unit test.
Return values
UNIT_TEST_PASSEDTest case cleanup succeeded.
UNIT_TEST_ERROR_CLEANUP_FAILEDTest case cleanup failed.

Definition at line 327 of file DxePrmContextBufferLibUnitTest.c.

◆ InitializeFunctionalCorrectness()

STATIC UNIT_TEST_STATUS EFIAPI InitializeFunctionalCorrectness ( IN UNIT_TEST_CONTEXT  Context)

===== FUNCTIONAL CORRECTNESS SUITE ==================================================

Functional Correctness pre-requisite function.

Installs a gPrmConfigProtocolGuid protocol instance as specified by the provided context in preparation for unit test execution

Parameters
[in]Context[Optional] An optional parameter that enables: A pointer to a PRM_CONTEXT_BUFFERS_TEST_CONTEXT structure with context information for this unit test.
Return values
UNIT_TEST_PASSEDUnit test case prerequisites are met.
UNIT_TEST_ERROR_PREREQUISITE_NOT_METTest case should be skipped.

Definition at line 276 of file DxePrmContextBufferLibUnitTest.c.

◆ main()

int main ( )

=== TEST ENGINE ================================================================================

Entry point for the PRM Context Buffer Library unit tests.

Parameters
[in]ImageHandleThe firmware allocated handle for the EFI image.
[in]SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point executed successfully.
otherSome error occurred when executing this entry point.

Definition at line 491 of file DxePrmContextBufferLibUnitTest.c.

◆ NullPointerArgumentsShouldFailGracefully()

UNIT_TEST_STATUS EFIAPI NullPointerArgumentsShouldFailGracefully ( IN UNIT_TEST_CONTEXT  Context)

=== HELPER FUNCTIONS ===========================================================================

=== TEST CASES ================================================================================= ===== BASIC SUITE ================================================== Verifies that passing NULL arguments to all library functions fails with EFI_INVALID_PARAMETER.

Parameters
[in]Context[Optional] An optional context parameter. Not used in this unit test.
Return values
UNIT_TEST_PASSEDUnit test case prerequisites are met.
UNIT_TEST_ERROR_PREREQUISITE_NOT_METTest case should be skipped..

Definition at line 230 of file DxePrmContextBufferLibUnitTest.c.

◆ VerifyFindContextBufferInModuleBuffers()

UNIT_TEST_STATUS EFIAPI VerifyFindContextBufferInModuleBuffers ( IN UNIT_TEST_CONTEXT  Context)

Verifies that the expected PRM_CONTEXT_BUFFER instance is found for the given HandlerGuid in the provided PRM_MODULE_CONTEXT_BUFFERS structure.

Parameters
[in]Context[Optional] An optional context parameter. A pointer to a PRM_CONTEXT_BUFFERS_TEST_CONTEXT structure with context information for this unit test.
Return values
UNIT_TEST_PASSEDUnit test case prerequisites are met.
UNIT_TEST_ERROR_PREREQUISITE_NOT_METTest case should be skipped..

Definition at line 411 of file DxePrmContextBufferLibUnitTest.c.

◆ VerifyGetContextBuffer()

UNIT_TEST_STATUS EFIAPI VerifyGetContextBuffer ( IN UNIT_TEST_CONTEXT  Context)

Verifies that the expected PRM_CONTEXT_BUFFER instance is found for the given HandlerGuid.

This function checks both the case when a PRM_MODULE_CONTEXT_BUFFERS structure pointer is provided and not provided.

NOTES:

  • In the future, this function should mock the internal calls to other library functions but the direct calls are left in place for now.
  • The PrmModuleContextBuffers being NULL is not actually tested at the moment. In the future, that case should also be added.
Parameters
[in]Context[Optional] An optional context parameter. A pointer to a PRM_CONTEXT_BUFFERS_TEST_CONTEXT structure with context information for this unit test.
Return values
UNIT_TEST_PASSEDUnit test case prerequisites are met.
UNIT_TEST_ERROR_PREREQUISITE_NOT_METTest case should be skipped..

Definition at line 455 of file DxePrmContextBufferLibUnitTest.c.

◆ VerifyGetModuleContextBuffers()

UNIT_TEST_STATUS EFIAPI VerifyGetModuleContextBuffers ( IN UNIT_TEST_CONTEXT  Context)

Verifies that the correct PRM_MODULE_CONTEXT_BUFFERS structure instance is found for a given PRM module or PRM handler GUID.

Parameters
[in]Context[Optional] An optional context parameter. A pointer to a PRM_CONTEXT_BUFFERS_TEST_CONTEXT structure with context information for this unit test.
Return values
UNIT_TEST_PASSEDUnit test case prerequisites are met.
UNIT_TEST_ERROR_PREREQUISITE_NOT_METTest case should be skipped..

Definition at line 369 of file DxePrmContextBufferLibUnitTest.c.

Variable Documentation

◆ mContextBuffer00

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer00 = { &mHandlerTestGuid1, &mTestPrmModuleContextBuffers1, &mTestPrmContextBuffer1, EFI_SUCCESS }

Definition at line 194 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffer01

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer01 = { &mHandlerTestGuid1, &mTestPrmModuleContextBuffers2, &mTestPrmContextBuffer1, EFI_SUCCESS }

Definition at line 195 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffer02

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer02 = { &mHandlerTestGuid2, &mTestPrmModuleContextBuffers3, &mTestPrmContextBuffer2[0], EFI_SUCCESS }

Definition at line 196 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffer03

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer03 = { &mHandlerTestGuid3, &mTestPrmModuleContextBuffers3, &mTestPrmContextBuffer2[1], EFI_SUCCESS }

Definition at line 197 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffer04

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer04 = { &mNegativeTestGuid, &mTestPrmModuleContextBuffers1, NULL, EFI_NOT_FOUND }

Definition at line 198 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffer05

PRM_CONTEXT_BUFFER_TEST_CONTEXT mContextBuffer05 = { &gZeroGuid, &mTestPrmModuleContextBuffers3, NULL, EFI_NOT_FOUND }

Definition at line 199 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBufferArray

PRM_CONTEXT_BUFFER_TEST_CONTEXT* mContextBufferArray[]
Initial value:
= {
&mContextBuffer00,
&mContextBuffer01,
&mContextBuffer02,
&mContextBuffer03,
&mContextBuffer04,
&mContextBuffer05
}

Definition at line 201 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers00

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers00 = { &mTestPrmModuleContextBuffers1, NULL, ByModuleGuid, &mModuleTestGuid1, &mModuleTestGuid1, EFI_SUCCESS }

Definition at line 156 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers01

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers01 = { &mTestPrmModuleContextBuffers2, NULL, ByModuleGuid, &mModuleTestGuid2, &mModuleTestGuid2, EFI_SUCCESS }

Definition at line 157 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers02

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers02 = { &mTestPrmModuleContextBuffers3, NULL, ByModuleGuid, &mModuleTestGuid3, &mModuleTestGuid3, EFI_SUCCESS }

Definition at line 158 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers03

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers03 = { &mTestPrmModuleContextBuffers3, NULL, ByModuleGuid, &mNegativeTestGuid, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 159 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers04

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers04 = { &mTestPrmModuleContextBuffers1, NULL, ByModuleGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 160 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers05

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers05 = { &mTestPrmModuleContextBuffers1, NULL, ByHandlerGuid, &mHandlerTestGuid1, &mModuleTestGuid1, EFI_SUCCESS }

Definition at line 166 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers06

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers06 = { &mTestPrmModuleContextBuffers1, NULL, ByHandlerGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 167 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers07

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers07 = { &mTestPrmModuleContextBuffers2, NULL, ByHandlerGuid, &mHandlerTestGuid1, &mModuleTestGuid2, EFI_SUCCESS }

Definition at line 168 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers08

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers08 = { &mTestPrmModuleContextBuffers2, NULL, ByHandlerGuid, &mNegativeTestGuid, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 169 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers09

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers09 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid1, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 170 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers10

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers10 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid2, &mModuleTestGuid3, EFI_SUCCESS }

Definition at line 171 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers11

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers11 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &mHandlerTestGuid3, &mModuleTestGuid3, EFI_SUCCESS }

Definition at line 172 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffers12

PRM_CONTEXT_BUFFERS_TEST_CONTEXT mContextBuffers12 = { &mTestPrmModuleContextBuffers3, NULL, ByHandlerGuid, &gZeroGuid, &gZeroGuid, EFI_NOT_FOUND }

Definition at line 173 of file DxePrmContextBufferLibUnitTest.c.

◆ mContextBuffersArray

PRM_CONTEXT_BUFFERS_TEST_CONTEXT* mContextBuffersArray[]
Initial value:
= {
&mContextBuffers00,
&mContextBuffers01,
&mContextBuffers02,
&mContextBuffers03,
&mContextBuffers04,
&mContextBuffers05,
&mContextBuffers06,
&mContextBuffers07,
&mContextBuffers08,
&mContextBuffers09,
&mContextBuffers10,
&mContextBuffers11,
&mContextBuffers12
}

Definition at line 175 of file DxePrmContextBufferLibUnitTest.c.

◆ mHandlerTestGuid1

EFI_GUID mHandlerTestGuid1 = HANDLER_TEST_GUID_1

Definition at line 62 of file DxePrmContextBufferLibUnitTest.c.

◆ mHandlerTestGuid2

EFI_GUID mHandlerTestGuid2 = HANDLER_TEST_GUID_2

Definition at line 66 of file DxePrmContextBufferLibUnitTest.c.

◆ mHandlerTestGuid3

EFI_GUID mHandlerTestGuid3 = HANDLER_TEST_GUID_3

Definition at line 70 of file DxePrmContextBufferLibUnitTest.c.

◆ mModuleTestGuid1

EFI_GUID mModuleTestGuid1 = MODULE_TEST_GUID_1

Definition at line 74 of file DxePrmContextBufferLibUnitTest.c.

◆ mModuleTestGuid2

EFI_GUID mModuleTestGuid2 = MODULE_TEST_GUID_2

Definition at line 78 of file DxePrmContextBufferLibUnitTest.c.

◆ mModuleTestGuid3

EFI_GUID mModuleTestGuid3 = MODULE_TEST_GUID_3

Definition at line 82 of file DxePrmContextBufferLibUnitTest.c.

◆ mNegativeTestGuid

EFI_GUID mNegativeTestGuid = NEGATIVE_TEST_GUID

Definition at line 86 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestPrmContextBuffer1

PRM_CONTEXT_BUFFER mTestPrmContextBuffer1
Initial value:
= {
PRM_CONTEXT_BUFFER_SIGNATURE,
PRM_CONTEXT_BUFFER_INTERFACE_VERSION,
0,
HANDLER_TEST_GUID_1,
&mTestStaticDataBuffer1
}

Definition at line 100 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestPrmContextBuffer2

PRM_CONTEXT_BUFFER mTestPrmContextBuffer2[2]
Initial value:
= {
{
PRM_CONTEXT_BUFFER_SIGNATURE,
PRM_CONTEXT_BUFFER_INTERFACE_VERSION,
0,
HANDLER_TEST_GUID_2,
},
{
PRM_CONTEXT_BUFFER_SIGNATURE,
PRM_CONTEXT_BUFFER_INTERFACE_VERSION,
0,
HANDLER_TEST_GUID_3,
&mTestStaticDataBuffer1
}
}
#define NULL
Definition: Base.h:319

Definition at line 108 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestPrmModuleContextBuffers1

PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers1
Initial value:
= {
MODULE_TEST_GUID_1,
1,
&mTestPrmContextBuffer1,
}

Definition at line 127 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestPrmModuleContextBuffers2

PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers2
Initial value:
= {
MODULE_TEST_GUID_2,
1,
&mTestPrmContextBuffer1,
}

Definition at line 134 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestPrmModuleContextBuffers3

PRM_MODULE_CONTEXT_BUFFERS mTestPrmModuleContextBuffers3
Initial value:
= {
MODULE_TEST_GUID_3,
2,
&mTestPrmContextBuffer2[0],
}

Definition at line 141 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestProtocolHandle

EFI_HANDLE mTestProtocolHandle

=== TEST DATA ==================================================================================

Definition at line 35 of file DxePrmContextBufferLibUnitTest.c.

◆ mTestStaticDataBuffer1

PRM_DATA_BUFFER mTestStaticDataBuffer1
Initial value:
= {
{
PRM_DATA_BUFFER_HEADER_SIGNATURE,
sizeof (PRM_DATA_BUFFER)
}
}

Definition at line 92 of file DxePrmContextBufferLibUnitTest.c.