UefiCpuPkg/MtrrLibUnitTest: Change to use static array for CI test
The unit test app supports running in 3 mode:
1. MtrrLibUnitTest generate-random-numbers
<path to MtrrLib/UnitTest/RandomNumber.c> <random-number count>
It generates random numbers and writes to RandomNumber.c.
2. MtrrLibUnitTest [<iterations>]
It tests MtrrLib APIs using configurations generated from static
numbers generated by mode #1.
This is the default execution mode running in CI environment.
3. MtrrLibUnitTest <iterations> random
It tests MtrrLib APIs using configurations generated from random
numbers.
This is what developers can use to test MtrrLib for regressions.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ming Shao <ming.shao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@@ -43,6 +43,7 @@ typedef struct {
|
||||
} MTRR_LIB_SYSTEM_PARAMETER;
|
||||
|
||||
extern UINT32 mFixedMtrrsIndex[];
|
||||
extern BOOLEAN mRandomInput;
|
||||
|
||||
/**
|
||||
Initialize the MTRR registers.
|
||||
@@ -179,4 +180,16 @@ Random32 (
|
||||
UINT32 Start,
|
||||
UINT32 Limit
|
||||
);
|
||||
|
||||
/**
|
||||
Generate Count random numbers in FilePath.
|
||||
|
||||
@param FilePath The file path to put the generated random numbers.
|
||||
@param Count Count of random numbers.
|
||||
**/
|
||||
VOID
|
||||
GenerateRandomNumbers (
|
||||
CHAR8 *FilePath,
|
||||
UINTN Count
|
||||
);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user