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.131]) by mx.groups.io with SMTP id smtpd.web12.2128.1602030502591759890 for ; Tue, 06 Oct 2020 17:28:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=F9OHGOo7; spf=pass (domain: microsoft.com, ip: 40.107.243.131, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gf0+FIYSWnqM/cY4NuXXfXyCD/GXxxhfnqbXG92UlGj0t35CjTtWz+ewU4qZHdkX56DgWXQUNUk6v60SLJwAjFT9QRsU3QyjGO+taPP74ZUnKQkYd/7B0qZr6OM3Xzmr/PKQxqwOPPgXxTqkZV3dDlEDii+CE2dt2HQVjZGG0G9MJVQCUgwIc7J6kkuNC7HI8ua6JceJkyTo4nBgCT7/8eejFTkcw/+OshUhBF9/Xf1OUtWLGJJaSnLESyaAZK68QDbPIYya/ko3kN/RStpi47YEv5yKcUZeRRMzTDt0OpTmNgRD4dST0Ggsxq2pq25/Q/8AoXtQQOmv7WM6acyy/g== 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=4CVI8fcARl/0wX7+H3n7/O7i/3UhjkqqFF5Vk058rzM=; b=VdFp3xRruwzhSv7ZVunf56BZDrS0S6oXlhKTkcRCoKKVRoQeYqhzWlbSrTb2T9swjWG4KJyCl+11HNx3z1Xz6887yYhePrVuI8jLbRVPMDcK7tKMzfAdUifAShzNb6W5TWWV8MVCDvcFXeskoRjcvTFXh7+n3BsQtlb+nVcJluC3MTN9Vim6qfBVbbQ2JpVUE8IwG/TKX8/VtAYkxYlh5Ovfaiu0BIBBh8GEjfQapyJfDzsNFq33GST4Fo9MGKfsDKgFMRIXWGzUbcw9eMEuMnfXbmZSMvQ7h5hlOiETj+F9eBWtFluLB3IvHrj2uitxB/q5VdkMPEb1Riq3gtnkow== 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=4CVI8fcARl/0wX7+H3n7/O7i/3UhjkqqFF5Vk058rzM=; b=F9OHGOo7via5vzYN2hICZBWQlLjlhoVsJGpzTPIc0epkFRIk2jzkEkG6AWmdHpvlKjGY+0nhKs+Izfk7iDYLknT7nBfqe4OKQPFSEhakIHAysvSPGgw2OD9y4/8a4FjIzGapcg6yf/36hpmgIT14RoXEZ8ZgXJExbVrRiA//tS8= Received: from PH0PR21MB1864.namprd21.prod.outlook.com (2603:10b6:510:9::20) by PH0PR21MB1894.namprd21.prod.outlook.com (2603:10b6:510:1b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.10; Wed, 7 Oct 2020 00:28:21 +0000 Received: from PH0PR21MB1864.namprd21.prod.outlook.com ([fe80::b503:b4ed:f973:7db4]) by PH0PR21MB1864.namprd21.prod.outlook.com ([fe80::b503:b4ed:f973:7db4%2]) with mapi id 15.20.3477.011; Wed, 7 Oct 2020 00:28:20 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" Subject: VariablePolicy: Final Changes Thread 2 - ECC & UnitTest Thread-Topic: VariablePolicy: Final Changes Thread 2 - ECC & UnitTest Thread-Index: AQHWnEAdZg2AspjF+EOfa3Ae4sws/w== Date: Wed, 7 Oct 2020 00:28:20 +0000 Message-ID: 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-10-07T00:23:44.4722391Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [71.212.128.184] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: b2fab1cc-7511-4456-a759-08d86a57e4e2 x-ms-traffictypediagnostic: PH0PR21MB1894: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wWBwdrMTzZ1S9K6I5GaxDjO1BHvFjqa4LU22SmUuCc4GwDQ7Yih2fwS2ahxtTwVfPnMclXa9xFQ6FKxdpplVeAyiuUh/YFmBjWkNzr6gurE672pPJPntIybQgo1aS4G+T2OLNygVv56HGqLTuZKGvgnXuO7+ccTLablXEXBGQBtGhs/TrwysS8rWwQI20M6tfJfa8Qf2nFUk2BZ4WDQoxXgwFJLSoaRIcjcFJTM4pL2zOLeCOVW5KasokwCQFvRSYKpPz6nSeiTp4wscTh3a0uTGSpZwQoQIMWHwW6LiG8nMVDJ30ekI+cVKHgl7+LUFT7oaL3weCG2YMAmzGU1UsfzEkjXxtcC+p0u9WWn8yxWNzrYyel5Gj55ZrqsrxNGYTx6mthKqBzwYXgTW0DBduA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR21MB1864.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(39860400002)(396003)(366004)(376002)(9686003)(52536014)(2906002)(71200400001)(66556008)(5660300002)(66476007)(91956017)(66446008)(64756008)(66946007)(186003)(316002)(76116006)(86362001)(33656002)(7696005)(55016002)(10290500003)(6506007)(26005)(4744005)(8676002)(82960400001)(166002)(6916009)(478600001)(82950400001)(83080400001)(8990500004)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: jaZRgD7TSvc3DpxPl1i+pL/8qNI2mLheYigvjdPbb9ORBW/vJTXFRKLd9JMFqRVCY4MgPVq+tkVI30ek8XzK1chi4cV+iSX2NDD7lQUNXyY/SNKDXzFJLV4PmrT2yLmRtxMYnOr9rDcny32S/6BXXMgWfZuXjYxC88p+GC1JV2zvVAP7BzfZAOLoux3EuSnexnvrPKVVmohhzcUuAC3F3gXKD6D1mFPLAKUswpO3HF/0ciH8e87dymsG+7aPIK2nCDytjW6p+Sk1XvyilHIWlu+V0d58pmKXA3Z1HRXg3P6JI7W0lSmAhBR4rtpv4PBYHsPgBx1el3YM0bn07yKcGNWUP/mvem1LZUjE3rbU4bFudY+b9tOP3XK7KVM9/OcCOsgAu/cFoppyLGvi7k0TTKZshWDJAbsK7tZUjOWNqVA8ZooDzIkYy0vPB7SifP7HFTGqKt7jkzBs2B6euwDnxpVprLqs5dBA5Q0DmHDjdlgBsagqjQ+B6+bZF7B3t0iX+6fBNkxE0OMhXCZgwYCSTEE1f1l7mPMOnzQhgbEK8o5BhSdr1KD8PyeNzpd6//AD50ON4jOVJAxtcjsJroAejN2ZyCnEL00HFV3B1itqhJV4XljwwGmm+o+OlRPO1XaRKAVA3tSRnx+V5Is/Ub0XOA== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR21MB1864.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2fab1cc-7511-4456-a759-08d86a57e4e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2020 00:28:20.6110 (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: PIvJtkyBHTB4RxsjoCRFXovxJBnqJTGOuVPhmU2wml1pd3LDrZme8Fx5plTOxD+889TeLIojvTQoiANcvyUZsQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR21MB1894 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR21MB1864408DA9492E0C0F77B5A0EF0A0PH0PR21MB1864namp_" --_000_PH0PR21MB1864408DA9492E0C0F77B5A0EF0A0PH0PR21MB1864namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I=92ve worked through all the ECC issues with Variable Policy (AND the Unit= Tests) on this branch: Commits =B7 corthon/edk2 (github.com) I even wrote the Main() entry point lib that Laszlo suggested (it works rat= her nicely): TEMP: Staging for HostTest entry point =B7 corthon/edk2@4ce5210 (github.com= ) However, there=92s one that I just can=92t get past and I would like to tak= e it up with the community. I don=92t think that UnitTests should have to d= eal with the =93can=92t initialize variables in declaration=94 check. Almos= t none of the solutions that I tested worked, and the ones that did were to= o cumbersome. They failed on two key points that are important for test wri= ting: * They were annoying to write =3D=3D=3D> fewer tests. * They moved even more of the test case data away from the test =3D=3D= =3D> harder to read tests. I would like to move for an exception for unit tests (or at least host-base= d unit tests), but I don=92t know how to accomplish that from a technical s= tandpoint. Thoughts? - Bret --_000_PH0PR21MB1864408DA9492E0C0F77B5A0EF0A0PH0PR21MB1864namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

I=92ve worked through all the ECC issues with Variab= le Policy (AND the UnitTests) on this branch:

Commits =B7 corthon/edk2 (github.com)=

 

I even wrote the Main() entry point lib that Laszlo = suggested (it works rather nicely):

TEMP: Staging for HostTest entry po= int =B7 corthon/edk2@4ce5210 (github.com)

 

However, there=92s one that I just can=92t get past = and I would like to take it up with the community. I don=92t think that Uni= tTests should have to deal with the =93can=92t initialize variables in decl= aration=94 check. Almost none of the solutions that I tested worked, and the ones that did were too cumbersome. They fail= ed on two key points that are important for test writing:

  • They were annoying to write =3D=3D=3D> fewer tests.
  • They moved even more of the test case data away from the test =3D=3D= =3D> harder to read tests.

 

I would like to move for an exception for unit tests= (or at least host-based unit tests), but I don=92t know how to accomplish = that from a technical standpoint.

 

Thoughts?

 

- Bret

 

--_000_PH0PR21MB1864408DA9492E0C0F77B5A0EF0A0PH0PR21MB1864namp_--