Hey Mike,

1. I'll move it for v4. 
2. I'll remove that, thanks!
3. I'll fix that as well, good spot. 
4. It's mostly the same except for the different CrtWrappers
5. We need a host-specific CrtWrapper since the regular one has a bunch of conflicts with regular C98, but there are a few functions that since we're building no std mode of OpenSSL we still need to provide.
6. That would be my guess- this is largely based on the edk2-staging HBFA branch and I've had to reverse engineer some of the steps for generating the test data. I fixed the instructions.

-Matthew Carlson


On Tue, Jul 14, 2020 at 7:53 PM Kinney, Michael D <michael.d.kinney@intel.com> wrote:
Hi Matt,

I think the BaseCryptLib unit tests may need some more work.

1) The DSC file for host based tests is in the wrong directory.
   It should be in CryptoPkg/Test to match the MdePkg, MdeModulePkg
   and UnitTestFrameworkPkg location.

2) CryptoPkg/CryptoPkg.dsc includes a reference to the host based
   library UnitTestHostBaseCryptLib.inf.  This should only be
   listed in the host based DSC file.

3) CryptoPkg\Library\BaseCryptLib\UnitTestHostBaseCryptLib.inf
   This file appears to only be for host based tests, but it
   lists compatibility with DXE_DRIVER DXE_CORE UEFI_APPLICATION UEFI_DRIVER
   and does not list HOST_APPLICATION as expected.

4) Why do we need a new lib instance of the BaseCryptLib for
   host based unit testing.  I would think we would want to perform
   unit tests on the BaseCryptLib instances that would actually be
   used in FW components.  Can we update the unit tests to test
   the services provided in the Base, Pei, Runtime, and Smm
   instances of the BaseCryptLib?

5) Why do we need a host based specific version of the CrtWrapper,
   UnitTestHostCrtWrapper.c?

6) The file CryptoPkg/Test/UnitTest/Librray/BaseCryptLib/TestEKUCerts/
   ChainCreationInstructions.txt makes reference to a bintohex tool
   and putting the results in a file called AllTestSignatures.h.
   But I do not see this file in the patch.  Are these instructions
   out of date?

Thanks,

Mike