From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.46]) by mx.groups.io with SMTP id smtpd.web12.12921.1638974364587820815 for ; Wed, 08 Dec 2021 06:39:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=kNMNwhDN; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.94.46, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m2zWUN+iycCthO98oay8ylaiSaNzgYUa3IK+q4s8nXU5yVAV5XBVCZRwy27+R/l7oI8N1BYAsqKNk19/4vw6g0Qvefvdo8jw9dElkWOR3Vnx8IBwUF/n/U7k+D/FXR8h15KeJpi3XgbUFDHj1Lmk6DnGinZyF4GhSI4hTF6Hl39nGnwx9qQxhrUZu30xiz/ab3Hsn5oxi9NzjWpKaKqcUsamkxB8Q30cDBOHW4wotGVd0UuPuT/Blcoc43un3MCOvoGdE0eq+PIz1qqsPKDSInMB4el0tlBLDbbz18NfM56NtG0rWhcI/N12PiRgpXQwTDAoVZZMBWXcGzYylvCq2g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sgRXR6Cegc2N2RMa19VLRQ46DKWl+JG/CNWC3qVyNJ0=; b=PhW5P+3XXAYMJ4L/ts8cro5NUg2GykXsKw7Pl1JeaVHwpsuTy72Q4yXZz0Tw8VGDYHb6qhZqqG69Du+czELpL+yqEvVMJfz5JzF9bsddQ80aauQr5tz5vMWeRji9idKocQXZL6QquEeeJOvRMaPKpWkFr9YqKlsCGt+fdvOvcZ7coLVuK2j15ma7ScbHbrXF7X18qQEfXZpqH8Y3eOHp1xt9Ygbj7fmt5FbiPAS7IQ3JhhrN61bgVWE012KCXphle0TO1LgoDO02Nyqzjp3ayy6AZiswDLtj4mFfaulvZ7eyQdDFOXV/Yp/Bu2nVa9q00gDs0JMTSNWHZqv+Vxj9KQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sgRXR6Cegc2N2RMa19VLRQ46DKWl+JG/CNWC3qVyNJ0=; b=kNMNwhDNX/Z5M168WQFUE8hNNTXizRZiwQb4RXrzR7V+Q5H5z3OWX0VCr0wRF4u91ITdKltEx8z18IrMtEMiTzu+gr62oY9ZG4GL8zO5aFmCG+Ey4Pm9RNLn26502u75Kq0rjvB/IGs4MyKZx+VXolg+LGQFww8FRIQp5WrD56U= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN6PR12MB2781.namprd12.prod.outlook.com (2603:10b6:805:67::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.22; Wed, 8 Dec 2021 14:39:22 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::35:281:b7f8:ed4c]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::35:281:b7f8:ed4c%6]) with mapi id 15.20.4755.021; Wed, 8 Dec 2021 14:39:22 +0000 Cc: brijesh.singh@amd.com Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard" To: "Kinney, Michael D" , "devel@edk2.groups.io" , "mikuback@linux.microsoft.com" References: From: "Brijesh Singh" Message-ID: <8bb9a4b2-2e04-62df-f688-9b6357091d21@amd.com> Date: Wed, 8 Dec 2021 08:39:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: X-ClientProxiedBy: MN2PR10CA0010.namprd10.prod.outlook.com (2603:10b6:208:120::23) To SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) Return-Path: brijesh.singh@amd.com MIME-Version: 1.0 Received: from [10.236.30.107] (165.204.77.1) by MN2PR10CA0010.namprd10.prod.outlook.com (2603:10b6:208:120::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.17 via Frontend Transport; Wed, 8 Dec 2021 14:39:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7e7c61d-a58c-4a00-a5d7-08d9ba58866a X-MS-TrafficTypeDiagnostic: SN6PR12MB2781:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:773; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JFop/j6i4bZsoQmFJ8huVgKoaOWiGFiyLEAn3n6Sg8Ko5ouIHTba02DYe65W9npSx40J88TU6S7KI+ebm9grQaswOjaMQpurd8B90WdP6DBn3l+jATp1jS4cdb3MIsXUwaBmOQUrJNfH9k9jBVNjbCdZShHu20s8xZo8WTgn07xZrgFjbwWMeSQWMD9bY+vewFg0ZWIZQ1O4VYeuw0ErkvRWW3pWTEot4oo6dT2Sdz0fkRmsL4ETfRTptM3BPqyJV1g+GwnDAckzXL7ZowVlGWGqzxeeW1GDxBGSOnRPVcDjZt1ntEPXjC/YJGCiWSkT05Wu+mbopSPRiiNQxpRmuoUgOQEhvo+hkWGFcekk512B/CAIIVJOcixnwJBXfh93PLrMQB0rISLaKbHH5+6Ndrc9GLkn1ZzazipcnkvSFyKe/8G5fgY5yHCQYL/oAj9czLHCs8hdNHYWU0kiYydg4u5jjbnHHUzEQ1rrGxnNwI1KEXSMxPxSDZewmik3IpyGw4fr9hYDXlgi39+wy+rRR4y2x6KI8N02SVjA/W2GhNW1qiwVSYrEzHxJbwbrVyPAZTYFN7ZjPTf1B8TVCkoWg5dCu6FkWV3k1jOSIaf4i2D7cjGjWY4tmF2fjr+eFDhVicxq0UU2cyR30u2/fQ5j/hB59F1RNdhvk5TVc72KnsM1ejJcPwz1qkYdaMHSNwG0z+Uuuyl3pJjoNI9b/x9iDaiqNWlBouomh9nOJKz0TaLAFeTWIdNgCC4wPZ3FNFCVcvC9QjU6qU5OLdr2f5yWRzcPuZ+mdBXWd9Cy/4xzyFVSONxysgirLKMUYvdc5BoSEojywF4/B2ZfwsPoF4mf4OTPkwaJjuPcoIARReARrds= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2718.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(110136005)(316002)(8936002)(38100700002)(186003)(2906002)(26005)(6486002)(16576012)(31686004)(4326008)(5660300002)(66476007)(53546011)(66946007)(31696002)(44832011)(36756003)(66556008)(45080400002)(19627235002)(86362001)(966005)(83380400001)(8676002)(2616005)(956004)(508600001)(43740500002)(45980500001)(460985005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QlhVZXdNWGl0VlNndmVPVGhVTjNrbDlrMmtYK0hveHB3QW4rbGhvc01qSjUv?= =?utf-8?B?RWJvUG5FR0xFMUF0b2o5S2VDbndIMkVUcE1uRjI2RXhVajFKWVlqSTYzUlc0?= =?utf-8?B?L0RLbm9qQ2VRT1BkenNmQUEwZ3BkaExvdGVwb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VRY25aNjFacUIrV2hqVHdhRDNRYzlLbExDdVNhekNLMVFEZHpB?= =?utf-8?B?eUh3aVZCb2pCOVMwZTE2U3hCMElGVnNpU2RJQnA0RS85RVlnVVR5WjlaclJJ?= =?utf-8?B?MW5MSXJkQnNBQUM5MlVOdVRFdkhvb3RYbjR0QUd2dVlDaFlkenBZREY5ZThR?= =?utf-8?B?YWF5MitoNDh2Z1BFb3UvMVRHNEQrc1dvNVEvL3pOTDZYUmdJM0RYS1JiS2Mw?= =?utf-8?Q?ppinlHRHfs85WolHNGcj2pM=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7e7c61d-a58c-4a00-a5d7-08d9ba58866a X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 14:39:22.6569 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rOeGCf1W9r5pFuzUMQxKS5ufvVdkWbXK+RcJgyPJC5IRwN+QEpyBYHuPsoQsgZPAN9XTnfqBEd0tVRheKxDSoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2781 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Mike, On 12/7/21 3:02 PM, Kinney, Michael D wrote: > Hi Brijesh, > > Yes. Your branch can be rebased on top of edk2/master after uncrustify changes. > > You have added new c/h files, so those files need to be run through uncrustify locally and > your patch updated with those formatting changes. > > The following command updates every c/h file except BaseTools locally. > > git ls-files *.c *.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed > > If you know the package you are working on, the following one will work faster. > > git ls-files *.c *.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed > > OvmfPkg Example: > > git ls-files OvmfPkg/*.c OvmfPkg/*.h :!BaseTools/* | .pytool\Plugin\UncrustifyCheck\mu-uncrustify-release_extdep\Windows-x86\uncrustify.exe -c .pytool\Plugin\UncrustifyCheck\uncrustify.cfg -F - --replace --no-backup --if-changed > > Thanks for the detail, I just did a pull and now I see the uncrustify cfg files. I followed your above command on my Ubuntu desktop and getting the below unknown symbol, is this a known issue ? brijesh@sbrijesh-desktop:~/workdir/snp-edk2$ git ls-files OvmfPkg/Sec/AmdSev.c | uncrustify -c .pytool/Plugin/UncrustifyCheck/uncrustify.cfg -F - --replace --no-backup --if-changed .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:73: unknown symbol 'nl_func_call_args_multi_line_ignore_closures' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:79: unknown symbol 'indent_func_call_edk2_style' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:120: unknown symbol 'sp_do_brace_open' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:134: unknown symbol 'sp_before_vardef_square' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:178: unknown symbol 'sp_brace_close_while' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:184: unknown symbol 'sp_before_square_asm_block' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:205: unknown symbol 'sp_while_paren_open' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:229: unknown symbol 'indent_func_def_param_paren_pos_threshold' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:270: unknown symbol 'align_edk2_style' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:323: unknown symbol 'cmt_align_doxygen_javadoc_tags' .pytool/Plugin/UncrustifyCheck/uncrustify.cfg:406: unknown symbol 'nl_before_whole_file_ifdef' Parsing: OvmfPkg/Sec/AmdSev.c as language C brijesh@sbrijesh-desktop:~/workdir/snp-edk2$ brijesh@sbrijesh-desktop:~/workdir/snp-edk2$ uncrustify --version Uncrustify-0.69.0_f I did submitted PR after above uncurstify run but the CI still didn't like it. Do we need to have specific version of uncrustify ? -Brijesh > You do have to use the .pytool stuart commands to setup your environment so uncrustify tool is installed automatically. > This also allows you to run all the EDK II CI tests locally if you want to check and fix issues before > submitting a PR. > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2F.pytool%2FReadme.md%23running-ci-locally&data=04%7C01%7Cbrijesh.singh%40amd.com%7Cb303a189de3446c5c52108d9b9c4e760%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637745077634999978%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OnGmCqMIEwmrZmn48M6MwErLyB60ORfN7CUceS%2BhPmI%3D&reserved=0 > > You can also use git filter-branch to uncrustify a more complex patch series. That is in the email thread > and will be included in the Wiki. > > Best regards, > > Mike > >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Michael Kubacki >> Sent: Tuesday, December 7, 2021 12:50 PM >> To: devel@edk2.groups.io; brijesh.singh@amd.com >> Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard" >> >> Hi Brijesh, >> >> A Tianocore wiki article is being prepared but the background and >> instructions for what to do were sent in this mail regarding the hard >> freeze being lifted - https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F84458&data=04%7C01%7Cbrijesh.singh%40amd.com%7Cb303a189de3446c5c52108d9b9c4e760%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637745077635009974%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LRtAPIFef6zlz6x0YNqpM9Hn5WIjFP1C0moMZFO9TWA%3D&reserved=0. >> >> Do you have questions after reading through that? >> >> Thanks, >> Michael >> >> On 12/7/2021 2:52 PM, Brijesh Singh via groups.io wrote: >>> Hi All, >>> >>> I am rebasing the SNP series and encountering the error like below from >>> the CI. I am not sure what I am missing. For testing purpose, I just >>> tried one commit and CI Windows build complains about this. This is the >>> same patch which passed all the CI. Any idea what I maybe missing ? >>> >>> >>> WARNING - A file header template is not specified in the config file. >>> WARNING - A function header template is not specified in the config file. >>> ERROR - /home/vsts/work/1/s/OvmfPkg/Sec/AmdSev.c >>> ERROR - /home/vsts/work/1/s/OvmfPkg/Sec/AmdSev.h >>> ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET >>> returned 2 >>> >>> >>> My patch does add the two files and they are listed in .inf. >>> >>> -Brijesh >>> >>> >>> >>> >> >> >> >> >