From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.17772.1597160157956005798 for ; Tue, 11 Aug 2020 08:35:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T8CQOqw7; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597160157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bnCRd+QGaJbpQ8Ur9UVG5XFzHWVG2nvB22PL+QkLaFw=; b=T8CQOqw732B2PI3gdwxHtQGGQAVrh+KGK1r89X9CbsbIP6NO6Pd7avrvtmyjzYAGR7qP13 GEFqVfOlHsH1/LwYWCmnW71Imh8ubSVRDIqCdeicuF1Ldd7eFYWa7CaTDF0trhpo4wQ6mh rvs4uEwvR4m48irjrhmviMEvui05jZc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-S6ycELKFNgWXE_4SfLLEiw-1; Tue, 11 Aug 2020 11:35:39 -0400 X-MC-Unique: S6ycELKFNgWXE_4SfLLEiw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BBD408017F4; Tue, 11 Aug 2020 15:35:36 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-221.ams2.redhat.com [10.36.113.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id C17A45F1EF; Tue, 11 Aug 2020 15:35:34 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v9 00/16] Add a plugin to check Ecc issues for edk2 on open ci To: devel@edk2.groups.io, shenglei.zhang@intel.com Cc: Bob Feng , Bret Barkelew , Michael D Kinney , Liming Gao , Sean Brogan , "Ard Biesheuvel (ARM address)" References: <20200811070204.55160-1-shenglei.zhang@intel.com> From: "Laszlo Ersek" Message-ID: Date: Tue, 11 Aug 2020 17:35:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200811070204.55160-1-shenglei.zhang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hello Shenglei, (+Ard) On 08/11/20 09:01, Zhang, Shenglei wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606 > As planed we will enable Ecc check for edk2 on open ci. And they are > ready now. I appreciate receiving feedback and comments if someone > find errors or false positive issues. > > I created a pipline of EccCheck for my forked edk2. Welcome everyone to > create pull request to test the quality of this plugin. > My forked tree: https://github.com/shenglei10/edk2 > > And I also created some test cases for ECC plugin. Below are test cases. > https://github.com/shenglei10/edk2/tree/ECC > Results can be view in below azure server. > https://dev.azure.com/shengleizhang/shengleizhang/_build?definitionId=12&_a=summary > > Patches > 1/16: It's a lib necessary for py3 to run Ecc on azure servers. > > 2/16: EccCheck.py is a plugin to report Ecc issues for commits. It can be run > on azure servers for open ci, or a local virtual environment. > > 3/16~16/16: We consider some cases that will report out Ecc issues but they won't > be fixed, like submodule and industry standard related things. So we > add two configuration fields "Exception" and "IgnoreFiles" for people > to use. These patches add configuration in yaml files for Ecc check. > > Cc: Bob Feng > Cc: Bret Barkelew > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Sean Brogan > > v2: Update 1/17, fix the bug that the script can't hanlde multiple commits. > > v3: Update 1/17, set the only workalbe workspace is edk2 root directory. > Update 2/17, designate the version of antlr4 is 4.7.1. > Add 4/17~17/17. > > v4. Update 1/17, remove the function EdksetupRebuild(), instead add > function SetupEnvironment(). Update variables' format and type hints > to pass flake8 and mypy. > > v5. Conver the former method to plugin solution, to align with > other check points on open ci. > > v6. The 1/16 patch is missed in v5 series. Now add it in v6. > > v7. Fix a bug that Ecc plugin can not be run correctly under Linux OS. > > v8. Enable error code config section to ignore certain kinds of issues, > which are always false positive in partial Ecc scaning. > All patches except 2/16 have been R-B and are not updated in v8 series. > To avoid making noise in community, I only send cover letter and 2/16 patch. 2/16: ".pytool/Plugin: Add a plugin EccCheck" > > v9. Update 2/16, 3/16, 5/16 and 16/16. 2/16: ".pytool/Plugin: Add a plugin EccCheck" 3/16: "MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check" 5/16: "CryptoPkg/CryptoPkg.ci.yaml: Add configuration for Ecc check" 16/16: "UnitTestFrameworkPkg: Add configuration for Ecc check in yaml file" So no changes to the ArmVirtPkg and OvmfPkg patches since v7. In v7, my Acked-by was present on both patches 04/16 ("ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for Ecc check"): http://mid.mail-archive.com/20200706084846.12748-5-shenglei.zhang@intel.com https://edk2.groups.io/g/devel/message/62075 and 11/16 ("OvmfPkg/OvmfPkg.ci.yaml: Add configuration for Ecc check"): http://mid.mail-archive.com/20200706084846.12748-12-shenglei.zhang@intel.com https://edk2.groups.io/g/devel/message/62082 Why did you drop my A-b from the ArmVirtPkg patch in v9? Thanks, Laszlo > 1. Enable directory path for "IgnoreFiles" section in xxxPkg.yaml. So that > users can skip a certain directory and don't need to fill in with file names. > 2. Add submodule pathes in "IgnoreFiles" in MdeModulePkg.ci.yaml, > CryptoPkg.ci.yaml and UnitTestFrameworkPkg.ci.yaml. > > Shenglei Zhang (16): > pip-requirements.txt: Add Ecc required lib > .pytool/Plugin: Add a plugin EccCheck > MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check > ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for Ecc check > CryptoPkg/CryptoPkg.ci.yaml: Add configuration for Ecc check > EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for Ecc check > FatPkg/FatPkg.ci.yaml: Add configuration for Ecc check > FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for Ecc check > MdePkg/MdePkg.ci.yaml: Add configuration for Ecc check > NetworkPkg/NetworkPkg.ci.yaml: Add configuration for Ecc check > OvmfPkg/OvmfPkg.ci.yaml: Add configuration for Ecc check > PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for Ecc check > SecurityPkg/SecurityPkg.ci.yaml: Add configuration for Ecc check > ShellPkg/ShellPkg.ci.yaml: Add configuration for Ecc check > UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for Ecc check > UnitTestFrameworkPkg: Add configuration for Ecc check in yaml file > > .pytool/Plugin/EccCheck/EccCheck.py | 302 ++++++++++++++++++ > .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml | 11 + > .pytool/Plugin/EccCheck/Readme.md | 15 + > ArmVirtPkg/ArmVirtPkg.ci.yaml | 11 + > CryptoPkg/CryptoPkg.ci.yaml | 13 + > EmulatorPkg/EmulatorPkg.ci.yaml | 11 + > FatPkg/FatPkg.ci.yaml | 12 + > FmpDevicePkg/FmpDevicePkg.ci.yaml | 12 + > MdeModulePkg/MdeModulePkg.ci.yaml | 13 + > MdePkg/MdePkg.ci.yaml | 11 + > NetworkPkg/NetworkPkg.ci.yaml | 12 + > OvmfPkg/OvmfPkg.ci.yaml | 11 + > PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml | 12 + > SecurityPkg/SecurityPkg.ci.yaml | 12 + > ShellPkg/ShellPkg.ci.yaml | 12 + > UefiCpuPkg/UefiCpuPkg.ci.yaml | 12 + > .../UnitTestFrameworkPkg.ci.yaml | 11 + > pip-requirements.txt | 1 + > 18 files changed, 494 insertions(+) > create mode 100644 .pytool/Plugin/EccCheck/EccCheck.py > create mode 100644 .pytool/Plugin/EccCheck/EccCheck_plug_in.yaml > create mode 100644 .pytool/Plugin/EccCheck/Readme.md >