public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, ray.ni@intel.com
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: [edk2-devel] [PATCH v4] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test
Date: Tue, 28 Jul 2020 14:09:37 +0200	[thread overview]
Message-ID: <88895b90-975d-499c-c7a8-48e7b0605fa1@redhat.com> (raw)
In-Reply-To: <20200728084325.142-1-ray.ni@intel.com>

Hi Ray,

On 07/28/20 10:43, Ni, Ray 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        | 1139 +++++++++++++++++
>  .../MtrrLib/UnitTest/MtrrLibUnitTest.h        |  182 +++
>  .../MtrrLib/UnitTest/MtrrLibUnitTestHost.inf  |   39 +
>  UefiCpuPkg/Library/MtrrLib/UnitTest/Support.c |  923 +++++++++++++
>  UefiCpuPkg/Test/UefiCpuPkgHostTest.dsc        |   31 +
>  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   12 +-
>  6 files changed, 2325 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

I don't have comments on this patch; I've been giving my Acked-by to
confirm that I'm OK with this particular set of files being introduced /
modified under UefiCpuPkg. So I'll defer on further versions to Eric.

For this version, this one last time:

Acked-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo


  reply	other threads:[~2020-07-28 12:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  8:43 [PATCH v4] UefiCpuPkg/MtrrLib/UnitTest: Add host based unit test Ni, Ray
2020-07-28 12:09 ` Laszlo Ersek [this message]
2020-07-28 16:37 ` [edk2-devel] " Sean
2020-07-28 17:13   ` Tim Lewis
2020-07-28 17:19     ` Michael D Kinney
2020-07-28 17:53     ` [EXTERNAL] " Bret Barkelew
2020-07-28 18:59       ` [EXTERNAL] " Andrew Fish
2020-07-28 20:08         ` Tim Lewis
2020-07-28 22:07           ` Michael D Kinney
2020-08-10  8:45             ` Ni, Ray
     [not found]             ` <1629DBB4A876976B.23512@groups.io>
2020-08-12 14:22               ` Ni, Ray
2020-08-12 17:40                 ` Laszlo Ersek
     [not found] <1625DE1EFA10C00D.10080@groups.io>
2020-07-28  8:46 ` 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=88895b90-975d-499c-c7a8-48e7b0605fa1@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