Date
1 - 3 of 3
[PATCH v1 1/2] UefiCpuPkg/Test: Move EfiMpServiceProtocol UT in a separate function
Jason Lou
From: Jason Lou <yun.lou@...>
Move the implementation of EfiMpServiceProtocol unit tests in a separate function in preparation for developing the UEFI application and dynamic command for the same unit tests. Signed-off-by: Jason Lou <yun.lou@...> Reviewed-by: Ray Ni <ray.ni@...> Cc: Eric Dong <eric.dong@...> Cc: Laszlo Ersek <lersek@...> Cc: Rahul Kumar <rahul1.kumar@...> --- UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnit= Test.c | 30 +++++++++++++++----- UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCom= mom.h | 2 +- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpService= ProtocolUnitTest.c b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiM= pServiceProtocolUnitTest.c index 57f8ba3c06..5fe6369960 100644 --- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtoco= lUnitTest.c +++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtoco= lUnitTest.c @@ -187,18 +187,16 @@ MpServicesUnitTestWhoAmI ( }=0D =0D /**=0D - Standard DXE driver or UEFI application entry point for unit test execut= ion from DXE or UEFI Shell.=0D - Initialize the unit test framework, suite, and unit tests for the EfiMpS= erviceProtocol and run the unit test.=0D + Initialize the unit test framework, suite and unit tests for the EfiMpSe= rviceProtocol and run the unit tests.=0D =0D - @param[in] ImageHandle The firmware allocated handle for the EFI ima= ge.=0D - @param[in] SystemTable A pointer to the EFI System Table.=0D + @retval EFI_SUCCESS Initialize the unit test framework, suite, uni= t tests and run the unit tests successfully.=0D + @retval Others Initialize the unit test framework, suite, uni= t tests or run the unit tests unsuccessfully.=0D =0D **/=0D EFI_STATUS=0D EFIAPI=0D -DxeEntryPoint (=0D - IN EFI_HANDLE ImageHandle,=0D - IN EFI_SYSTEM_TABLE *SystemTable=0D +EfiMpServiceProtocolUnitTest (=0D + VOID=0D )=0D {=0D EFI_STATUS Status;=0D @@ -242,3 +240,21 @@ EXIT: =0D return Status;=0D }=0D +=0D +/**=0D + Standard DXE driver or UEFI application entry point for unit test execut= ion from DXE or UEFI Shell.=0D + Initialize the unit test framework, suite, and unit tests for the EfiMpS= erviceProtocol and run the unit test.=0D +=0D + @param[in] ImageHandle The firmware allocated handle for the EFI ima= ge.=0D + @param[in] SystemTable A pointer to the EFI System Table.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +DxeEntryPoint (=0D + IN EFI_HANDLE ImageHandle,=0D + IN EFI_SYSTEM_TABLE *SystemTable=0D + )=0D +{=0D + return EfiMpServiceProtocolUnitTest ();=0D +}=0D diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpService= sUnitTestCommom.h b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMp= ServicesUnitTestCommom.h index abbbd2faba..d2b1633b4d 100644 --- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe= stCommom.h +++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe= stCommom.h @@ -1,5 +1,5 @@ /** @file=0D - Common header file for EfiMpServiceProtocolUnitTest DXE driver.=0D + Common header file for EdkiiPeiMpServices2Ppi and EfiMpServiceProtocol u= nit test.=0D =0D Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>=0D =0D --=20 2.28.0.windows.1 |
|
Zhiguang Liu
Reviewed-by: Zhiguang Liu <zhiguang.liu@...> |
|
duntan
Reviewed-by: Dun Tan <dun.tan@...>
toggle quoted message
Show quoted text
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jason Lou Sent: Thursday, November 24, 2022 8:12 PM To: devel@edk2.groups.io Cc: Lou, Yun <yun.lou@...>; Ni, Ray <ray.ni@...>; Dong, Eric <eric.dong@...>; Laszlo Ersek <lersek@...>; Kumar, Rahul R <rahul.r.kumar@...> Subject: [edk2-devel] [PATCH v1 1/2] UefiCpuPkg/Test: Move EfiMpServiceProtocol UT in a separate function From: Jason Lou <yun.lou@...> Move the implementation of EfiMpServiceProtocol unit tests in a separate function in preparation for developing the UEFI application and dynamic command for the same unit tests. Signed-off-by: Jason Lou <yun.lou@...> Reviewed-by: Ray Ni <ray.ni@...> Cc: Eric Dong <eric.dong@...> Cc: Laszlo Ersek <lersek@...> Cc: Rahul Kumar <rahul1.kumar@...> --- UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c | 30 +++++++++++++++----- UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h | 2 +- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c index 57f8ba3c06..5fe6369960 100644 --- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProtocolUnitTest.c +++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServiceProt +++ ocolUnitTest.c @@ -187,18 +187,16 @@ MpServicesUnitTestWhoAmI ( } /**- Standard DXE driver or UEFI application entry point for unit test execution from DXE or UEFI Shell.- Initialize the unit test framework, suite, and unit tests for the EfiMpServiceProtocol and run the unit test.+ Initialize the unit test framework, suite and unit tests for the EfiMpServiceProtocol and run the unit tests. - @param[in] ImageHandle The firmware allocated handle for the EFI image.- @param[in] SystemTable A pointer to the EFI System Table.+ @retval EFI_SUCCESS Initialize the unit test framework, suite, unit tests and run the unit tests successfully.+ @retval Others Initialize the unit test framework, suite, unit tests or run the unit tests unsuccessfully. **/ EFI_STATUS EFIAPI-DxeEntryPoint (- IN EFI_HANDLE ImageHandle,- IN EFI_SYSTEM_TABLE *SystemTable+EfiMpServiceProtocolUnitTest (+ VOID ) { EFI_STATUS Status;@@ -242,3 +240,21 @@ EXIT: return Status; }++/**+ Standard DXE driver or UEFI application entry point for unit test execution from DXE or UEFI Shell.+ Initialize the unit test framework, suite, and unit tests for the EfiMpServiceProtocol and run the unit test.++ @param[in] ImageHandle The firmware allocated handle for the EFI image.+ @param[in] SystemTable A pointer to the EFI System Table.++**/+EFI_STATUS+EFIAPI+DxeEntryPoint (+ IN EFI_HANDLE ImageHandle,+ IN EFI_SYSTEM_TABLE *SystemTable+ )+{+ return EfiMpServiceProtocolUnitTest ();+}diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h index abbbd2faba..d2b1633b4d 100644 --- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCommom.h +++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUni +++ tTestCommom.h @@ -1,5 +1,5 @@ /** @file- Common header file for EfiMpServiceProtocolUnitTest DXE driver.+ Common header file for EdkiiPeiMpServices2Ppi and EfiMpServiceProtocol unit test. Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> -- 2.28.0.windows.1 -=-=-=-=-=-= Groups.io Links: You receive all messages sent to this group. View/Reply Online (#96613): https://edk2.groups.io/g/devel/message/96613 Mute This Topic: https://groups.io/mt/95236455/6168883 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [dun.tan@...] -=-=-=-=-=-= |
|