From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.130]) by mx.groups.io with SMTP id smtpd.web12.220.1594786019359917661 for ; Tue, 14 Jul 2020 21:06:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=dmBT4Je2; spf=pass (domain: microsoft.com, ip: 40.107.243.130, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hlHUWFVWHwpk0cEwxUyakgYnd7kpmIfRrFWsED8kguiw4kP5N2WqRKmkzKmOTBCdL+qL04I2FNQnkvSxc9+y6ggPswH6zAK5S+ZkvVuoshHG78pdh6rxne9OgDWLOk5czBPV48EdMPC1cIZooxI1+LUzBuvQkLlFx/bBWFAcP74cZjIvN3/+xsCLM1zqkPqNFu1+oPDGBq5lmjhlkq584P5WsEj2eXXbsSGWdIfPzklq+FRa8bipM4nGhZoCKX3qn5kfdCfNY/yR9u61AkWOcFMKyq+PB59QKYuNdF8pT57WseNJ6ZlH1mdTXWlj2WXl40BZagoifXR3r+Bg6rO4vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YxSUM7kOx3xP5zEUgCTwA3aIeLJM4v4AiXEoLBB0Nyc=; b=WZKFLhBajqIvA6VrW8zUVUPDcgU2ZFtPb8FmmXv6yFV8DQBI0WAHZl4YTbr2mN9o6LkARhH5jo7tdYaV61EeYsl8wVCjEITVOBLul1DCnbe/BrRGIyssD5Ilw/qL9K9301eiq1FTsgtVv4FSx5PTMJe+lxtejoFwrpJsbz5yhxHogbQzroSX7QtZUI+H1flcTzI0pAd5E7i4I/CSmofQrlsPhJ4cTGdp6BjnRiDlZ7t2KjM5el4sDHyrFzxP6/uJ7aYz29baXii9tapZ3DmwqnTO7IR0XcSkPJ11imLNZkNu4CujHanPJX7+hHVWIGOgHUz9H8GeM1V3NxfUUR7HaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YxSUM7kOx3xP5zEUgCTwA3aIeLJM4v4AiXEoLBB0Nyc=; b=dmBT4Je2T2m45n6njNUu++fzPtU4Yp13JLthszOE0fRJVwCEnQDSfsu5JfZlKMeNeQVHoGGXlZwUzSmLhQPqtXRSmI/wK6z+rAQtRkApPe9hJshyRMTDfS8EhCPgMDms9YrjKfLyaOYPaa7gjFlbUsRRoFv9f4iPUfyd4+BNqns= Received: from CY4PR21MB0743.namprd21.prod.outlook.com (2603:10b6:903:b2::9) by CY4PR21MB0504.namprd21.prod.outlook.com (2603:10b6:903:dc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.7; Wed, 15 Jul 2020 04:06:58 +0000 Received: from CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd]) by CY4PR21MB0743.namprd21.prod.outlook.com ([fe80::f112:82fb:d4fd:f7dd%10]) with mapi id 15.20.3216.008; Wed, 15 Jul 2020 04:06:58 +0000 From: "Bret Barkelew" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Sean Brogan , "Yao, Jiewen" Subject: Re: [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable source level debug for host tests Thread-Topic: [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable source level debug for host tests Thread-Index: AQHWVyhKiS6R9a7EnEaov6KU5VGjhKkIDG+/ Date: Wed, 15 Jul 2020 04:06:57 +0000 Message-ID: References: <20200711020904.24116-1-michael.d.kinney@intel.com>,<20200711020904.24116-8-michael.d.kinney@intel.com> In-Reply-To: <20200711020904.24116-8-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2020-07-15T04:06:54.1864531Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [174.21.66.92] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f5433594-227e-4d7e-69ec-08d8287484c4 x-ms-traffictypediagnostic: CY4PR21MB0504: x-ms-exchange-transport-forked: True x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xTLEgBeE0ba5NcHF465YnxVxMPgf+i3d+4cw0T/iCe7VOxFYJh1KL6oIJh9hXryM9BVGAHLfbAaKgGsTnYqZdJ2ZYKyQc339KQRUYre9pIIC9T0071xYy89OoY/08epK7D5Pi4K3Iacqed8LGbMYdPgXoWw+bDQiesKQcMRq5CkAVTi611vPSV/82XzTqlfC5OTJmQWK0MLdtifl8cUiM+KKqgPvx7hpO3xEP213FixONPSwCG9iNs/0Clz2osYYDxtXiVrqNToGC5WjgPH+i9vDE1wQs4Ph4P9wrOG+o6fdNkGfWjL9u/4v/xMv/zO5e0bZpZWBuJcx3o6Zt4RpjMn6u7r6Ur3N5B2g13txF3swgwhOpUuMMR4QVjMHDrVyjdoj+O922gMhDLm7sCdu1g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR21MB0743.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(136003)(376002)(396003)(366004)(39860400002)(186003)(4326008)(91956017)(316002)(66476007)(82950400001)(6506007)(82960400001)(76116006)(52536014)(66556008)(2906002)(64756008)(110136005)(54906003)(66946007)(8990500004)(166002)(55016002)(53546011)(9686003)(7696005)(86362001)(8676002)(5660300002)(966005)(26005)(83380400001)(10290500003)(71200400001)(478600001)(66446008)(33656002)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 9iZLhwQ6bZquzYhl0ogrP8koa3//QgDhvS76t+ovggsjiY4ucdfub3Xb+INlVQ0douNprZVZpSujqz0e98+d3eEPUM8VVjNZ4ym4FOuv2xWMzulfxJOxry64W3NsO7O7KCu8kb6kRGt6rQj9DjRTJSDlYkB9ux7roSMDkhFl9ggokIIbaUxqJdZfYlcogTpy3sAuXdrFQq8Zi1MllQKOWeTS/SGX3pLWtuDoBzSAFnUkGeB/n3uCkGXANRRNBpxye8Du2E0VombROXMOZKhL0JkoH2DgqDF2GPL6rYY/rGARxtGz6LlC2v/WvJLONcWgQwvpNGp/zvkROOyDu+mDSpfRZTD+W0viBUoPVpdPvAtabTyB6Dp5UvbsPt6p86QRhq/4qLR9MH4i6Gvnj2DS+EdQ4hG0tYYsrmhq6jfjdEqT+vtCqIw+I3GmSP+PrzAcAkjt7mNZoPEFKYJbuPQvz87L0SKeog3W92ufFlRHEnI= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR21MB0743.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5433594-227e-4d7e-69ec-08d8287484c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jul 2020 04:06:57.9968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 061EYzJm2Z8Mei7trK6W6t523zWqsiQrBexLL9FEOagyi+u4+KBJItJKy7EtiiIqiFICWWVDrojDmau3XbzkPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0504 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CY4PR21MB0743BB67B2B0E4AB2881E1A6EF7E0CY4PR21MB0743namp_" --_000_CY4PR21MB0743BB67B2B0E4AB2881E1A6EF7E0CY4PR21MB0743namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bret Barkelew - Bret ________________________________ From: Michael D Kinney Sent: Friday, July 10, 2020 7:08:55 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable source le= vel debug for host tests REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbu= gzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2804&data=3D02%7C01%7CBret.B= arkelew%40microsoft.com%7Cd31f0dcf6e6d4f80bd3008d8253f689e%7C72f988bf86f141= af91ab2d7cd011db47%7C1%7C0%7C637300301550028840&sdata=3DoNgc2S2JjPYyf0H= h%2FjS7EqunqyH4%2BB7nfWWZBDDGWIE%3D&reserved=3D0 Optionally enable a feature to support source level debug of a host based unit test. By default, this feature is disabled. Exceptions are caught by the unit test framework and are interpreted as a test failure. When a unit test is under development, bugs may generate exceptions or a unit test developer may want to trace the execution of unit tests to debug some unexpected behavior. Defining UNIT_TESTING_DEBUG in the DSC file or from the build command line allows exceptions to be caught by the host OS and allows the developer to debug their unit test under development or debug the Unit Test Framework itself. Cc: Sean Brogan Cc: Bret Barkelew Cc: Jiewen Yao Signed-off-by: Michael D Kinney --- UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTe= stFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc index c22085fae1..c4e6e0e0a6 100644 --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc @@ -20,6 +20,11 @@ [LibraryClasses.common.HOST_APPLICATION] [BuildOptions] GCC:*_*_*_CC_FLAGS =3D -fno-pie +!ifdef $(UNIT_TESTING_DEBUG) + MSFT:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 + GCC:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 + XCODE:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1 +!endif [BuildOptions.common.EDKII.HOST_APPLICATION] # -- 2.21.0.windows.1 --_000_CY4PR21MB0743BB67B2B0E4AB2881E1A6EF7E0CY4PR21MB0743namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Reviewed-by: Bret Barkelew <bret.barkelew@microso= ft.com>

 

 

- Bret

 


From: Michael D Kinney <= michael.d.kinney@intel.com>
Sent: Friday, July 10, 2020 7:08:55 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <= ;Bret.Barkelew@microsoft.com>; Yao, Jiewen <jiewen.yao@intel.com><= br> Subject: [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable so= urce level debug for host tests
 
REF: https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fbugzill= a.tianocore.org%2Fshow_bug.cgi%3Fid%3D2804&amp;data=3D02%7C01%7CBret.Ba= rkelew%40microsoft.com%7Cd31f0dcf6e6d4f80bd3008d8253f689e%7C72f988bf86f141a= f91ab2d7cd011db47%7C1%7C0%7C637300301550028840&amp;sdata=3DoNgc2S2JjPYy= f0Hh%2FjS7EqunqyH4%2BB7nfWWZBDDGWIE%3D&amp;reserved=3D0

Optionally enable a feature to support source level debug of a
host based unit test.  By default, this feature is disabled.
Exceptions are caught by the unit test framework and are
interpreted as a test failure.

When a unit test is under development, bugs may generate
exceptions or a unit test developer may want to trace the
execution of unit tests to debug some unexpected behavior.
Defining UNIT_TESTING_DEBUG in the DSC file or from the build
command line allows exceptions to be caught by the host OS
and allows the developer to debug their unit test under
development or debug the Unit Test Framework itself.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTe= stFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index c22085fae1..c4e6e0e0a6 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -20,6 +20,11 @@ [LibraryClasses.common.HOST_APPLICATION]
 
 [BuildOptions]
   GCC:*_*_*_CC_FLAGS =3D -fno-pie
+!ifdef $(UNIT_TESTING_DEBUG)
+  MSFT:*_*_*_CC_FLAGS  =3D -D UNIT_TESTING_DEBUG=3D1
+  GCC:*_*_*_CC_FLAGS   =3D -D UNIT_TESTING_DEBUG=3D1
+  XCODE:*_*_*_CC_FLAGS =3D -D UNIT_TESTING_DEBUG=3D1
+!endif
 
 [BuildOptions.common.EDKII.HOST_APPLICATION]
   #
--
2.21.0.windows.1

--_000_CY4PR21MB0743BB67B2B0E4AB2881E1A6EF7E0CY4PR21MB0743namp_--