public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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 v3] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test
Date: Tue, 28 Jul 2020 11:58:05 +0200	[thread overview]
Message-ID: <29252ab5-be05-2289-e311-70e8002bc704@redhat.com> (raw)
In-Reply-To: <20200728023007.610-1-ray.ni@intel.com>

On 07/28/20 04:30, 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: 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>
> ---
>  .../MtrrLib/UnitTest/MtrrLibUnitTest.c        | 1140 +++++++++++++++++
>  .../MtrrLib/UnitTest/MtrrLibUnitTest.h        |  171 +++
>  .../MtrrLib/UnitTest/MtrrLibUnitTestHost.inf  |   39 +
>  UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c |  913 +++++++++++++
>  UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc        |   31 +
>  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   12 +-
>  6 files changed, 2305 insertions(+), 1 deletion(-)
>  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>


      reply	other threads:[~2020-07-28  9:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  2:30 [PATCH v3] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test Ni, Ray
2020-07-28  9:58 ` Laszlo Ersek [this message]

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=29252ab5-be05-2289-e311-70e8002bc704@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