From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web08.7023.1649169661719460399 for ; Tue, 05 Apr 2022 07:41:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=cKsvwg2N; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id CA62420DFD71; Tue, 5 Apr 2022 07:41:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CA62420DFD71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649169661; bh=WjxLojpYqavpydYrAgNoXK9iCWeephufSR9jCPaR3NI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=cKsvwg2Np8AExUKz3YG1VEjcPoZiUPsHp1/lRiGCKkvbIRwjXMU+jsGVZv2PwZkDO 5M+Bx0Fm7L27Y3Aj+tGyWMbZrdASXc87m1jCLeHWqgp7HHIOZF8BmCdK8Q0yMbyTkH 5vvBNlF1Qk+HIEGBHvfqdgCr7LvZDjxZ/We8E8Dk= Message-ID: <5d3f6c47-1de9-ba06-d1e1-0099288c54c1@linux.microsoft.com> Date: Tue, 5 Apr 2022 10:40:59 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [edk2-devel] EDK2 CI build error "Uncrustify Coding Standard" To: devel@edk2.groups.io, ashish.kalra@amd.com References: <14608.1649138274027224886@groups.io> <18598.1649138980553258823@groups.io> From: "Michael Kubacki" In-Reply-To: <18598.1649138980553258823@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Before discussing how to see the issues locally, here's how to see them in the pipelines. I will send a separate reply with local details. 1. Go to the build that is failing Uncrustify. I am using this PR for your case: https://github.com/tianocore/edk2/pull/2742 2. Click "Details" I am using "Ubuntu GCC5 PR" for your case At this point the issue is described: "Check file coding standard compliance in Edk2CiBuild.Edk2.OvmfPkg UncrustifyCheck failed due to 3 incorrectly formatted files." 3. Click "View more details on Azure Pipelines" https://github.com/tianocore/edk2/pull/2742/checks?check_run_id=5826935687 4. Find the failing job and click it. In your case it is "Build_GCC5_TARGET_PLATFORMS". https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=47536&view=results 5. It will now have a link showing "XX%" tests passed (65% in this instance). Click that link to see the tests that failed. https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=47536&view=logs&j=ec42d809-3c3b-54a9-276c-e54a8b9aaee9 6. Now, in the tests summary it will show the same message you saw in step (2): "Check file coding standard compliance in Edk2CiBuild.Edk2.OvmfPkg UncrustifyCheck failed due to 3 incorrectly formatted files." https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=47536&view=ms.vss-test-web.build-test-results-tab Click that text to open more details. https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=47536&view=ms.vss-test-web.build-test-results-tab&runId=345782&resultId=100009&paneView=debug 7. Now, you will see the following error message in the "Debug" tab by default: "UncrustifyCheck failed due to 3 incorrectly formatted files." Click the "Attachments" tab to get more details. https://dev.azure.com/tianocore/edk2-ci/_build/results?buildId=47536&view=ms.vss-test-web.build-test-results-tab&runId=345782&resultId=100009&paneView=attachments 8. Now, you will see details about the Uncrustify run in the "Standard_Console_Output.log" attachment: """ Uncrustify version: Uncrustify-c82ee034 Found Uncrustify at /home/vsts/work/1/s/.pytool/Plugin/UncrustifyCheck/mu-uncrustify-release_extdep/Linux-x86/uncrustify Uncrustify version: Uncrustify-c82ee034 Uncrustify executed against 513 files in OvmfPkg in 2.31 seconds. """ Click on the "Standard_Error_Output.log" attachment to get more details about the error. Those details for your job are as follows. This is a diff of the changes needed. """ Files with formatting errors: Formatting errors in Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c --- /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c +++ /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/PeiDxeMemEncryptSevLibInternal.c.uncrustify_plugin @@ -36,8 +36,8 @@ RETURN_STATUS EFIAPI MemEncryptSevLocateInitialSmramSaveStateMapPages ( - OUT UINTN *BaseAddress, - OUT UINTN *NumberOfPages + OUT UINTN *BaseAddress, + OUT UINTN *NumberOfPages ) { UINTN MapStart; @@ -50,8 +50,8 @@ return RETURN_UNSUPPORTED; } - MapStart = SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET; - MapEnd = MapStart + sizeof (QEMU_SMRAM_SAVE_STATE_MAP); + MapStart = SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET; + MapEnd = MapStart + sizeof (QEMU_SMRAM_SAVE_STATE_MAP); MapPagesStart = MapStart & ~(UINTN)EFI_PAGE_MASK; MapPagesEnd = ALIGN_VALUE (MapEnd, EFI_PAGE_SIZE); MapPagesSize = MapPagesEnd - MapPagesStart; @@ -87,34 +87,34 @@ Signature[12] = '\0'; for (mKvmLeaf = 0x40000000; mKvmLeaf < 0x40010000; mKvmLeaf += 0x100) { AsmCpuid ( - mKvmLeaf, - NULL, - (UINT32 *)&Signature[0], - (UINT32 *)&Signature[4], - (UINT32 *)&Signature[8] - ); + mKvmLeaf, + NULL, + (UINT32 *)&Signature[0], + (UINT32 *)&Signature[4], + (UINT32 *)&Signature[8] + ); if (AsciiStrCmp (Signature, "KVMKVMKVM") == 0) { DEBUG ( - ( - DEBUG_INFO, - "%a: KVM Detected, signature = %a\n", - __FUNCTION__, - Signature - ) - ); + ( + DEBUG_INFO, + "%a: KVM Detected, signature = %a\n", + __FUNCTION__, + Signature + ) + ); RegEax = mKvmLeaf + 1; RegEcx = 0; AsmCpuid (mKvmLeaf + 1, &RegEax, &RegEbx, &RegEcx, &RegEdx); if ((RegEax & KVM_FEATURE_MIGRATION_CONTROL) != 0) { DEBUG ( - ( - DEBUG_INFO, - "%a: SEV Live Migration feature supported\n", - __FUNCTION__ - ) - ); + ( + DEBUG_INFO, + "%a: SEV Live Migration feature supported\n", + __FUNCTION__ + ) + ); return TRUE; } Formatting errors in Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c --- /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c +++ /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c.uncrustify_plugin @@ -20,11 +20,11 @@ #include "PeiDxeMemEncryptSevLibInternal.h" -STATIC UINT64 mCurrentAttr = 0; -STATIC BOOLEAN mCurrentAttrRead = FALSE; -STATIC UINT64 mSevEncryptionMask = 0; -STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE; -STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; +STATIC UINT64 mCurrentAttr = 0; +STATIC BOOLEAN mCurrentAttrRead = FALSE; +STATIC UINT64 mSevEncryptionMask = 0; +STATIC BOOLEAN mSevEncryptionMaskSaved = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; STATIC BOOLEAN mSevLiveMigrationStatusChecked = FALSE; /** @@ -127,7 +127,7 @@ ) { if (KvmDetectSevLiveMigrationFeature ()) { - mSevLiveMigrationStatus = TRUE; + mSevLiveMigrationStatus = TRUE; } mSevLiveMigrationStatusChecked = TRUE; Formatting errors in Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c --- /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c +++ /home/vsts/work/1/s/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c.uncrustify_plugin @@ -19,8 +19,8 @@ #include "PeiDxeMemEncryptSevLibInternal.h" -STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; -STATIC BOOLEAN mSevLiveMigrationStatusChecked = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatus = FALSE; +STATIC BOOLEAN mSevLiveMigrationStatusChecked = FALSE; /** Read the workarea to determine whether SEV is enabled. If enabled, """ Thanks, Michael On 4/5/2022 2:09 AM, Ashish Kalra via groups.io wrote: > Hi Mike, > > I am following up on Brijesh's email, i am running the CI tests related > to my SEV live migration patches, > which i am in process of posting. > > I am running the CI tests locally and getting errors while building > OvmfPkg, my patches include two new > header files, error log is copied below. > > Do you have updated instructions on how to run through uncrustify > locally and > get my patch updated with those formatting changes, especially for Linux ? > (your above instructions seem specific to Windows). > > Thanks, > Ashish > > Error log: > > ../.local/bin/stuart_ci_build -c .pytool/CISettings.py > TOOL_CHAIN_TAG=GCC5 -p OvmfPkg SECTION - Init SDE WARNING - Using Pip > Tools based BaseTools SECTION - Loading Plugins SECTION - Start > Invocable Tool SECTION - Getting Environment SECTION - Loading plugins > SECTION - Building OvmfPkg Package PROGRESS - --Running OvmfPkg: > Uncrustify Coding Standard Test NO-TARGET -- 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/amd/edk2-upstream/OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c > ERROR - > /home/amd/edk2-upstream/OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c > ERROR - --->Test Failed: Uncrustify Coding Standard Test NO-TARGET > returned 2 PROGRESS - --Running OvmfPkg: Guid Check Test NO-TARGET -- > PROGRESS - --->Test Success: Guid Check Test NO-TARGET PROGRESS - > --Running OvmfPkg: Char Encoding Check Test NO-TARGET -- PROGRESS - > --->Test Success: Char Encoding Check Test NO-TARGET PROGRESS - > --Running OvmfPkg: Spell Check Test NO-TARGET -- WARNING - NodeJs not > installed. Test can't run WARNING - --->Test Skipped: in plugin! Spell > Check Test NO-TARGET PROGRESS - --Running OvmfPkg: Dsc Complete Check > Test NO-TARGET -- PROGRESS - --->Test Success: Dsc Complete Check Test > NO-TARGET PROGRESS - --Running OvmfPkg: Host Unit Test Dsc Complete > Check Test NO-TARGET -- PROGRESS - --->Test Success: Host Unit Test Dsc > Complete Check Test NO-TARGET PROGRESS - --Running OvmfPkg: Host Unit > Test Compiler Plugin NOOPT -- WARNING - --->Test Skipped: in plugin! > Host Unit Test Compiler Plugin NOOPT PROGRESS - --Running OvmfPkg: > Library Class Check Test NO-TARGET -- PROGRESS - --->Test Success: > Library Class Check Test NO-TARGET PROGRESS - --Running OvmfPkg: > EccCheck Test NO-TARGET -- PROGRESS - --->Test Skipped by package! > EccCheck Test PROGRESS - --Running OvmfPkg: Compiler Plugin DEBUG -- > WARNING - --->Test Skipped: in plugin! Compiler Plugin DEBUG PROGRESS - > --Running OvmfPkg: Compiler Plugin RELEASE -- WARNING - --->Test > Skipped: in plugin! Compiler Plugin RELEASE PROGRESS - --Running > OvmfPkg: Dependency Check Test NO-TARGET -- PROGRESS - --->Test Success: > Dependency Check Test NO-TARGET PROGRESS - --Running OvmfPkg: License > Check Test NO-TARGET -- PROGRESS - --->Test Success: License Check Test > NO-TARGET ERROR - Overall Build Status: Error PROGRESS - There were 1 > failures out of 13 attempts SECTION - Summary ERROR - Error >