From: "Laszlo Ersek" <lersek@redhat.com>
To: Ray Ni <ray.ni@intel.com>, devel@edk2.groups.io
Cc: Michael D Kinney <michael.d.kinney@intel.com>,
Ming Shao <ming.shao@intel.com>, Eric Dong <eric.dong@intel.com>,
Sean Brogan <sean.brogan@microsoft.com>,
Bret Barkelew <Bret.Barkelew@microsoft.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: Re: [PATCH] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test
Date: Fri, 17 Jul 2020 11:36:46 +0200 [thread overview]
Message-ID: <59a058cf-8c9b-b2a3-f672-921f11e634d3@redhat.com> (raw)
In-Reply-To: <20200717073318.877-1-ray.ni@intel.com>
On 07/17/20 09:33, Ray Ni wrote:
> Add host based unit tests for the MtrrLib services.
> The BaseLib services AsmCpuid(), AsmReadMsr64(), and
> AsmWriteMsr64() are hooked and provide simple emulation
> of the CPUID leafs and MSRs required by the MtrrLib to
> run as a host based unit test.
>
> Test cases are developed for each of the API.
>
> For the most important APIs MtrrSetMemoryAttributesInMtrrSettings()
> and MtrrSetMemoryAttributeInMtrrSettings(), random inputs are
> generated and fed to the APIs to make sure the implementation is
> good. The test application accepts an optional parameter which
> specifies how many iterations of feeding random inputs to the two
> APIs. The overall number of test cases increases when the iteration
> increases. Default iteration is 10 when no parameter is specified.
>
> Signed-off-by: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Ming Shao <ming.shao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Ming Shao <ming.shao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> ---
> .../MtrrLib/UnitTest/MtrrLibUnitTest.c | 1094 +++++++++++++++++
> .../MtrrLib/UnitTest/MtrrLibUnitTest.h | 171 +++
> .../MtrrLib/UnitTest/MtrrLibUnitTestHost.inf | 39 +
> UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c | 913 ++++++++++++++
> UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc | 31 +
> 5 files changed, 2248 insertions(+)
> create mode 100644 UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c
> create mode 100644 UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.h
> create mode 100644 UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTestHost.inf
> create mode 100644 UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c
> create mode 100644 UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc
Acked-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2020-07-17 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 7:33 [PATCH] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test Ni, Ray
2020-07-17 9:36 ` Laszlo Ersek [this message]
2020-07-24 1:33 ` Michael D Kinney
2020-07-24 6:53 ` Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59a058cf-8c9b-b2a3-f672-921f11e634d3@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox