Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 2812668bfc121ee792cf3302195176ef4a2ad0bc
      
https://github.com/tianocore/edk2/commit/2812668bfc121ee792cf3302195176ef4a2ad0bc
  Author: Zhiguang Liu <zhiguang....@intel.com>
  Date:   2022-08-16 (Tue, 16 Aug 2022)

  Changed paths:
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTest.h
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTestHost.c
    A 
UefiCpuPkg/Library/CpuPageTableLib/UnitTest/CpuPageTableLibUnitTestHost.inf
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomNumber.c
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.h
    A UefiCpuPkg/Library/CpuPageTableLib/UnitTest/TestHelper.c
    M UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc
    M UefiCpuPkg/UefiCpuPkg.ci.yaml

  Log Message:
  -----------
  UefiCpuPkg/CpuPageTableLib/UnitTest: Add host based unit test

Add host based unit tests for the CpuPageTableLib services.

Unit test focuses on PageTableMap function, containing two kinds of test
cases: manual test case and random test case.
Manual test case creates some corner case to test function PageTableMap.
Random test case generates multiple random memory entries (with random
attribute) as the input of function PageTableMap to get the output
pagetable. Output pagetable will be validated and be parsed to get output
memory entries, and then the input and output memory entries will be
compared to verify the functionality.

The unit test is not perfect yet. There are options for random test, and
some of them control the test coverage, and some option are not ready.
Will enhance in the future.

Cc: Eric Dong <eric.d...@intel.com>
Reviewed-by: Ray Ni <ray...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang....@intel.com>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to