| Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a reusable GoogleTest mock implementation covering all public RngLib APIs. Include it in MdePkgHostTest.dsc so CI validates the mock with host-based unit tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Marc Chen <marc.chen@microsoft.com>
|
|
Add a reusable GoogleTest mock implementation covering all public PeCoffLib APIs. Include it in MdePkgHostTest.dsc so CI validates the mock with host-based unit tests.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Marc Chen <marc.chen@microsoft.com>
|
|
InstallConfigurationTable is used in the AddImageExeInfo
call and is necessary for outputting information about
the binary file in case of an error. Mock has been added
for the DxeImageVerificationHandler subroutine.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
|
|
Update recent changes in MdePkg to follow the latest EDK II
C Coding Standards Specification (5.3) to use '#pragma once' instead
of traditional macro-based include guards in header files.
https://tianocore-docs.github.io/edk2-CCodingStandardsSpecification/draft/5_source_files/53_include_files.html#53-include-files
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Added mock library for UefiRuntimeLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added moc library for UefiDevicePathLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for SynchronizationLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for SmmMemLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for PerformanceLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for PciLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock librart for PciExpressLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for PciCf8Lib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for PcdLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for MmServicesTableLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for MemoryAllocationLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for IoLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for DxeServicesTableLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added mock library for DxeServicesLib for google test
Signed-off-by: Paddy Deng (AMI US Holdings Inc) <v-dengpaddy@microsoft.com>
|
|
Added several mock libraries for google test so one can make google test
drives consuming those libraries:
- MockReportStatusCodeLib
- MockSerialPortLib
Signed-off-by: Paddy Deng <PaddyDeng@ami.com>
|
|
Update FdtGetName() and FdtGetPath() to correctly mark the VOID *Fdt
as a CONST variable. This aligns with the internal libfdt
implementation.
Update MockFdtLib.h to align with the updated inputs for FdtGetName()
and FdtGetPath().
Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
|
|
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.
`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.
Compared to macro-based include guards, `#pragma once`:
- Eliminates the risk of macro name collisions or copy/paste errors
where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
(e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
file entirely, rather than re-reading it to find the matching
`#endif` ("multiple-include optimization").
- Note that some compilers may already optimize traditional include
guards, by recognzining the idiomatic pattern.
This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.
However, this is considered acceptable given:
1. edk2 already defines a subset of supported compilers in
BaseTools/Conf/tools_def.template, all of which have supported
`#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
include guard naming and potential macro collisions.
Approximate compiler support dates:
- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
(http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
Add FdtDelNode() and FdtGetPath() mock functions.
Signed-off-by: Bob Morgan <bobm@nvidia.com>
|
|
Added Google Mock test support for DevicePathLib.
Added OpenProtocol and CloseProtocol for UefiBootServicesTableLib
mock library.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
|
|
This commit is to add two new APIs in MdePkg PeiHobLib,
DxeHobLib, DxeCoreHobLib and MockHobLib:
1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.
2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.
Signed-off-by: Dun Tan <dun.tan@intel.com>
|
|
Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
|
|
Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
|
|
Signed-off-by: v-sbolisetti <v-sbolisetti@microsoft.com>
|
|
Mock Libraries:
MdePkg\Test\Mock\Library\GoogleTest\MockCpuLib
MdePkg\Test\Mock\Library\GoogleTest\MockPciSegmentLib
MdePkg\Test\Mock\Library\GoogleTest\MockReportStatusCodeLib
MdePkg\Test\Mock\Library\GoogleTest\MockSmmServicesTableLib
Mock Protocol:
MdePkg\Test\Mock\Include\GoogleTest\Protocol\MockMpService.h
Signed-off-by: jack Hsieh <v-chhsieh@microsoft.com>
Cc: Maintainer Shruti Gupta <shrugupt@microsoft.com>
Cc: Reviewer Shruti Gupta <shrugupt@microsoft.com>
|
|
There is currently a mix on functions named as Prop or Property.
The latter is in majority, and the better fit for tianocore coding style,
so rename FdtNodeOffsetByPropValue () and FdtSetProp () for consistency.
To avoid breaking bisect, change existing users in UefiPayloadPkg.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
|
|
This commit adds a mock library for UefiBootServicesTableLib.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
|
|
This adds support for GetTime Google Test Mock
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Add Google Mock Library for FdtLib
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
|
|
Apply uncrustify formatting to GoogleTest cpp and header files.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4443
Add Google Mock Library for HobLib
Add Google Mock Library for PeiServicesLib
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Chris Johnson <chris.n.johnson@intel.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4389
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chris Johnson <chris.n.johnson@intel.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
|