From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"jeshuas@nvidia.com" <jeshuas@nvidia.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>,
"sean.brogan@microsoft.com" <sean.brogan@microsoft.com>
Subject: Re: [edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
Date: Wed, 14 Dec 2022 23:49:07 +0000 [thread overview]
Message-ID: <SA2PR11MB493881020B101C2DFF4F10DCD2E09@SA2PR11MB4938.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SA2PR11MB4938355E3B9B2C096C69B03FD2E09@SA2PR11MB4938.namprd11.prod.outlook.com>
Merged
PR: https://github.com/tianocore/edk2/pull/3771
Commit: https://github.com/tianocore/edk2/commit/44fc90eb0ea7299abc79577db55aa6257b46b7ae
Mike
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Wednesday, December 14, 2022 3:10 PM
> To: devel@edk2.groups.io; jeshuas@nvidia.com; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: mikuback@linux.microsoft.com; sean.brogan@microsoft.com
> Subject: RE: [edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
>
> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
>
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jeshua Smith via groups.io
> > Sent: Wednesday, November 30, 2022 3:02 PM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; mikuback@linux.microsoft.com; sean.brogan@microsoft.com; Jeshua
> Smith
> > <jeshuas@nvidia.com>
> > Subject: [edk2-devel] [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail
> >
> > Update the UnitTestAssertStatusEqual error message to print out the
> > expected value in addition to the seen value.
> >
> > Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
> > ---
> > UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > index dc05bbd438..0d8e36c938 100644
> > --- a/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
> > @@ -290,7 +290,7 @@ UnitTestAssertStatusEqual (
> > {
> > CHAR8 TempStr[MAX_STRING_SIZE];
> >
> > - snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p)", Description, (VOID *)Status);
> > + snprintf (TempStr, sizeof (TempStr), "UT_ASSERT_STATUS_EQUAL(%s:%p expected:%p)", Description, (VOID *)Status, (VOID
> > *)Expected);
> > _assert_true ((Status == Expected), TempStr, FileName, (INT32)LineNumber);
> >
> > return (Status == Expected);
> > --
> > 2.25.1
> >
> >
> >
> >
> >
prev parent reply other threads:[~2022-12-14 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 23:02 [PATCH v3] UnitTestFrameworkPkg/UnitTestLib: Print expected Status on ASSERT fail Jeshua Smith
2022-11-30 23:06 ` [edk2-devel] " Michael Kubacki
2022-12-14 15:28 ` Jeshua Smith
2022-12-14 23:09 ` Michael D Kinney
2022-12-14 23:49 ` Michael D Kinney [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=SA2PR11MB493881020B101C2DFF4F10DCD2E09@SA2PR11MB4938.namprd11.prod.outlook.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