public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/2] UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib
@ 2022-11-04  0:24 Michael Kubacki
  2022-11-04  0:24 ` [PATCH v1 1/2] " Michael Kubacki
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Kubacki @ 2022-11-04  0:24 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Sean Brogan

From: Michael Kubacki <michael.kubacki@microsoft.com>

This patch series moves a library that is useful for stubbing UEFI
Boot Services from PrmPkg to UnitTestFrameworkPkg.

An example of library usage that makes use of mocked protocol
interfaces to retain protocol state is here:

https://github.com/tianocore/edk2/blob/master/PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTest.c

Over the last few months, I've had several people contact me about
such mocking and I've pointed them to the library instance in
PrmPkg.

I've also heard they would like to contribute and consider it for
use in features outside PrmPkg so I'd like to propose moving the
library instance to UnitTestFrameworkPkg so it can be more widely
available and accessible for others to improve upon.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>

Michael Kubacki (2):
  UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib
  PrmPkg: Use UnitTestFrameworkPkg UEFI BS library

 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.c                     |  4 ++--
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestEventTimer.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibEventTimer.c |  2 +-
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestImage.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibImage.c           |  2 +-
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMemory.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMemory.c         |  2 +-
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMisc.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMisc.c             |  2 +-
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.c     |  2 +-
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestTpl.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibTpl.c               |  2 +-
 PrmPkg/PrmPkg.dsc                                                                                                                                                                                                        |  1 -
 PrmPkg/Test/PrmPkgHostTest.dsc                                                                                                                                                                                           |  6 -----
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.h => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.h                     |  0
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.inf => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf                 | 24 ++++++++++----------
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibTest.uni => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.uni                     |  0
 PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.h => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.h     |  2 +-
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.dsc                                                                                                                                                                            |  1 +
 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc                                                                                                                                                                    |  1 +
 15 files changed, 23 insertions(+), 28 deletions(-)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.c (97%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestEventTimer.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibEventTimer.c (95%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestImage.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibImage.c (96%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMemory.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMemory.c (96%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestMisc.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMisc.c (96%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.c (96%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestTpl.c => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibTpl.c (89%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.h => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.h (100%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTest.inf => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.inf (54%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibTest.uni => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.uni (100%)
 rename PrmPkg/Test/UnitTest/Library/UefiBootServicesTableLibUnitTest/UefiBootServicesTableLibUnitTestProtocol.h => UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.h (95%)

-- 
2.28.0.windows.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-04  0:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04  0:24 [PATCH v1 0/2] UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib Michael Kubacki
2022-11-04  0:24 ` [PATCH v1 1/2] " Michael Kubacki
2022-11-04  0:24 ` [PATCH v1 2/2] PrmPkg: Use UnitTestFrameworkPkg UEFI BS library Michael Kubacki
2022-11-04  0:44 ` [PATCH v1 0/2] UnitTestFrameworkPkg: Add UnitTestUefiBootServicesTableLib Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox