From nobody Sun May 5 14:27:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67289+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1605112972801897.7790278826772; Wed, 11 Nov 2020 08:42:52 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6RAQYY1788612xoMuH5589G6; Wed, 11 Nov 2020 08:42:44 -0800 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.80]) by mx.groups.io with SMTP id smtpd.web09.8737.1605110488049892160 for ; Wed, 11 Nov 2020 08:01:28 -0800 X-Received: from AM6PR08CA0007.eurprd08.prod.outlook.com (2603:10a6:20b:b2::19) by VI1PR08MB4511.eurprd08.prod.outlook.com (2603:10a6:803:f9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.24; Wed, 11 Nov 2020 16:01:24 +0000 X-Received: from VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::4a) by AM6PR08CA0007.outlook.office365.com (2603:10a6:20b:b2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Wed, 11 Nov 2020 16:01:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67289+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT056.mail.protection.outlook.com (10.152.19.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.22 via Frontend Transport; Wed, 11 Nov 2020 16:01:23 +0000 X-Received: ("Tessian outbound 39167997cde8:v71"); Wed, 11 Nov 2020 16:01:23 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1144d60de77a176d X-CR-MTA-TID: 64aa7808 X-Received: from 658df2d53c7b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 393EE728-6529-4731-9B24-6929A4609595.1; Wed, 11 Nov 2020 16:01:17 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 658df2d53c7b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 11 Nov 2020 16:01:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lOzIMa5bVonAwMQWq93fw7IQLKJGVM4eUtQhYRYTZtmSKhT6+xI41Uk80XFyfTCh99EaMnj74C7Xlcvoovojjv6Nr17MzimrKpjZ+nHUmdjpt2oZNk+IZvCmJQmXdXMFqfuj3PdiEB0vm/MTZlpoNmj2SSx8ghh9SHwkoUdbppXCaObqrCyVsL5+8XbwYLVQ61UlUy1JCZw/H7hv+yUSUQi5ATnE0CXZVRnVkPqGcVaiZlBLpy7sXj3fz7TaA6o8TcqLn3l1l6dgd510eqgJ5FX32InCSxAW5PfVMRE7vTkPB0z8I4SxLT7pG20rcu7Gb0wKCPHayUBVALTHEw5dNQ== 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=js4S7JCV0vTO5puVP6BbMFCRL2qWkNsm3X8g6DWmkaI=; b=TMuL/yw0Y4lZjv0ZvTP2lbvrUhYo9WHopuwygtuCCgUqRYFOpQT/6/2q8s+GG1fuK6WClRQ52DJa93CEXArs0GLL/DTdizFfV7ZhNuWNvP1K9gdfWunsx9I8JtXymNQK2Zohgy1AWnBfj7O2Stt6rc6xyYDA5SNmoVaJRwxKAzaAcu+UBQBb0a1rFAUJWcoPbOj/hUKdD7VTQn/trfo2Jy0pULaUVoJ8pxIJxyfRa2YLO69zkUvk/ACQkVZeSsjCGA89vXySLot66GpRMvj3J65jlDlWc9rw86mn/T/4Ri0mJAq298uV6vDZaZytVCcce6PkIP4MhED51tdW+zKORQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-Received: from DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) by DB6PR08MB2919.eurprd08.prod.outlook.com (2603:10a6:6:1e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.25; Wed, 11 Nov 2020 16:01:16 +0000 X-Received: from DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::98af:2036:2908:bb3a]) by DB8PR08MB4010.eurprd08.prod.outlook.com ([fe80::98af:2036:2908:bb3a%5]) with mapi id 15.20.3541.021; Wed, 11 Nov 2020 16:01:16 +0000 From: Grant Likely To: devel@edk2.groups.io CC: nd@arm.com, Grant Likely , Grant Likely , Samer El-Haj-Mahmoud , G Edhaya Chandran , Eric Jin , Barton Gao Subject: [edk2-devel] [edk2-test] [PATCH] Fix missing symbols on edk2-test build Date: Wed, 11 Nov 2020 16:00:11 +0000 Message-ID: <20201111160010.8881-1-grant.likely@arm.com> X-Originating-IP: [188.28.144.143] X-ClientProxiedBy: LNXP265CA0057.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::21) To DB8PR08MB4010.eurprd08.prod.outlook.com (2603:10a6:10:ab::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Received: from moist.secretlab.ca (188.28.144.143) by LNXP265CA0057.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Wed, 11 Nov 2020 16:01:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 06978461-181b-47ed-103b-08d8865b09f9 X-MS-TrafficTypeDiagnostic: DB6PR08MB2919:|VI1PR08MB4511: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wXmn/lIgbFFFxnivxybJG3BOujho1UzZjsYWToQTcsBOPlnse1DBGYS+iEUjvcYOTrvmKbNGiaIHUo2jO8QADfP57Bqhi++eNPDVyngiToDhLK+S3nMgddgiPxCIOIzCQsDPKAB0eawAorlAt3z9R/tfBZVU/9RIkIiOfkZ90TRK6j3x/f6zMQxRwqYe2lIQnEhmo0fovmltwPVgXhr/ew45Y/e4unzPhvPrWk46r8/+cVYOZ2yVoDjDafCUXchX4XAqtBK4TCg8yF8hdQra4uYmmfJ7Ac8zldKjpOYkiDrWl9OKiwR1BJWAqVqoksA/oXlkXYRp9hZEjm4qV1046Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB4010.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(376002)(136003)(366004)(396003)(346002)(52116002)(16526019)(55236004)(6916009)(4326008)(66946007)(186003)(66574015)(26005)(83380400001)(2906002)(44832011)(5660300002)(86362001)(6506007)(6512007)(54906003)(316002)(1076003)(36756003)(6486002)(6666004)(66556008)(478600001)(8676002)(8936002)(66476007)(2616005)(956004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: F/5EVrzZWINozWdm06NcYmxFj+hgn897HLwIAVKlGD1oJN1Px08/WicHj34lNr3xrM1MqOiDH7Nf3zCyfDY+PPyNYkEXo/kaP4OSZOc9NRuZjCFY9BIlmeYy0hGDKcv5Km4Zp21AqtzsBcXacXU0X8z08tmNsSf5X/jcpsaOjxBw0kaBaTgy9aeRrxrLfr50WcGZnxgQ05fDyx++O8G5UA/ERB/lcnSMLVt2/WQWG7k/KXkyynOAR2qpGPWRxXi7BoJKhRbBMbT/7pIY5PB42ABtYc/F6R7/APemgGFgjUoXmwZdu8cvDa8ihYaMyvll9vwukReO7nCPeEz9PIvenjk1I15BDI54d5Wv4Et1XnyfX6JDhiZs75G9N2h/OThpSjaGUAs8SyQzVZbG2PuzylfaeXOq20/qnL6Tg6AIRJaUEpXzI60lC5q3yJJ56CLCRdw4SfCihD1+bz79OF1/n16DdiLHuz+asGLrb+Z2MQHYeH8xqv6c8PM0qKOTZg83ww5S70pCLKWxW0IhwRG1Tbvgmeo25k3yJC8SudlebtDfxR/g6p0TCszWe3m0AudYYsvuM42HHZxtGX2a79fPwQxc4gCkdpv0/cWlQR7iCftlCQUZ5HYOrwDVCEJ7sufrb9eBrvAmFOkXou+NFT1kUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2919 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c675f670-391d-4214-1fa3-08d8865b0546 X-Microsoft-Antispam-Message-Info: 3gdu9GONMRXBBdzILgvseYKyfNgkQYQUH19wOLeqC7MmRt3/AE3DNWNRGjfMMFPjMCc+KPqVCWER7ZMkUlvERPcy0uT68yJkS07G0bpl82CQwP+pnW6JKvB0zuXCMJjLLtR5u1Dgn36qQy3SRgKqBNVCLN9jGxm0uJQTLgG1YyXuN9CfvT2E98qauirOoUmPPNIjxPfpC+Y6t9Z68ddMkzorcYFUH58J+jOw7fzHb+fattsgbBj07ZMhdNKEHpBtyTsLk+zFYlS/jBS9bwtG7FVi+36yS2uiz+3qukvjut8oLoyY5/PZGeMOgVVgt5zZRw+4JNaR2ZlTbWf+S0qiXfDhZ8HMsLwy+otUHoHJXT3+6XA5C9nV1EXZOZdZgh9ZtP5/aTNKRqMAaNbfyT0/tw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2020 16:01:23.9089 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06978461-181b-47ed-103b-08d8865b09f9 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4511 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,grant.likely@arm.com X-Gm-Message-State: 1uv4IpNxirdp3ivYsQ2UZXGxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1605112964; bh=yNdRB1m1XbLOJcLxKphNNiHXHFdDT/OvUmhG5xnQjik=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Vf+WdQIcE06BrUhB4Tc4LCchV+I3lRt6Uz3AIh/OHgC7WyNMAXtLoaCXgcfzavR4mjh AF9CuU5+NpZXas8e3luhyI39QP8NLlzF4X1c6gqNcM42YgwC9n6Dv57AXl5h0MGshYdCG HOg5YFPHKFxyiz11Khrxne9bq+VJXdkyChA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" EDK2 has removed some deprecated function wrappers. The BlackBoxTest still uses StrnCpy() and UnicodeValueToString(). This patch fixes the build by moving to UnicodeValueToStringS(). However, the code using StrnCpy() is simply #ifdef'd out because on reading the code it is apparent that the testcase is non-functional and the fix is not straightforward. As I understand it, there are no functional implementations of the interface in the wild anyway. If/when it does become important someone can do the work of making a proper test case. Fixes: Bug 2068 Signed-off-by: Grant Likely Cc: Samer El-Haj-Mahmoud Cc: G Edhaya Chandran Cc: Eric Jin Cc: Barton Gao Reviewed-by: G Edhaya Chandran Reviewed-by: Samer El-Haj-Mahmoud --- .../Dependency/SampleDriver/DriverSample.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/ConfigKeywordHandle= r/BlackBoxTest/Dependency/SampleDriver/DriverSample.c b/uefi-sct/SctPkg/Tes= tCase/UEFI/EFI/Protocol/ConfigKeywordHandler/BlackBoxTest/Dependency/Sample= Driver/DriverSample.c index fe973a33..584ee8b4 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/ConfigKeywordHandler/Black= BoxTest/Dependency/SampleDriver/DriverSample.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/ConfigKeywordHandler/Black= BoxTest/Dependency/SampleDriver/DriverSample.c @@ -920,8 +920,9 @@ ExtractConfig ( =20 BackupChar =3D Value[ValueStrLen]; *Value++ =3D L'=3D'; - Value +=3D UnicodeValueToString ( + Value +=3D UnicodeValueToStringS ( Value,=20 + BufferSize - (Value - *Results), PREFIX_ZERO | RADIX_HEX,=20 PrivateData->Configuration.NameValueVar0,=20 sizeof (PrivateData->Configuration.NameValueVar0) * 2 @@ -939,8 +940,9 @@ ExtractConfig ( =20 BackupChar =3D Value[ValueStrLen]; *Value++ =3D L'=3D'; - Value +=3D UnicodeValueToString ( + Value +=3D UnicodeValueToStringS ( Value,=20 + BufferSize - (Value - *Results), PREFIX_ZERO | RADIX_HEX,=20 PrivateData->Configuration.NameValueVar1,=20 sizeof (PrivateData->Configuration.NameValueVar1) * 2 @@ -962,7 +964,8 @@ ExtractConfig ( // StrPointer =3D (CHAR16 *) PrivateData->Configuration.NameValueVar2; for (; *StrPointer !=3D L'\0'; StrPointer++) { - Value +=3D UnicodeValueToString (Value, PREFIX_ZERO | RADIX_HEX, *= StrPointer, 4); + Value +=3D UnicodeValueToStringS (Value, BufferSize - (Value - *Re= sults), + PREFIX_ZERO | RADIX_HEX, *StrPoint= er, 4); } } =20 @@ -1894,7 +1897,7 @@ DriverSampleInit ( MY_EFI_VARSTORE_DATA *VarStoreConfig; EFI_INPUT_KEY HotKey; EDKII_FORM_BROWSER_EXTENSION_PROTOCOL *FormBrowserEx; -#if 1 +#if 0 EFI_STRING Progress; EFI_STRING Results; UINT32 ProgressErr; @@ -2243,7 +2246,9 @@ DriverSampleInit ( HiiRemovePackages (HiiHandle[1]); } =20 -#if 1 +#if 0 // gcl - This test case is incomplete and fails to compile. StrnCpy = needs to be + // changed to StrnCpyS() to fix build error, but there is a larger p= roblem that + // the testcases don't match the spec or test any behaviour // // Test Cases 1: Keyword - GetData and change the value by SetData // --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#67289): https://edk2.groups.io/g/devel/message/67289 Mute This Topic: https://groups.io/mt/78186938/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-