From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 15B67740035 for ; Thu, 10 Apr 2025 09:19:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BAfrMHki3xw8ksZcTkNfssBOenaHOF7U8z7RV6thyi4=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240830; t=1744276762; v=1; x=1744535961; b=JqMVlKAkgcxrdjveegYZjFnVjXkAKxT5hTvB7z7cY7jb++f9oFiHFL1MfhjfmYvbC2PWEGTS 3+4YyuFDHDHn7897L2zW4DvhUDAzRt9Kv/b5/7GYi/tMRBsp7EOp2niCCG+P+c555h0F5Ugbcot Fm+6STZfAvaendrcObrG+4AkLH3eF2am/Wcwqh/k6Fzeos7IfVhr9ZyerwqmrFsdpWdYZspMY9q wAeDuPCtQBH4A33elpMnfFmPANqJ/nXY8SDQKtMzJGkMyxzCWko8BchsE4X0MRteHORxIME3Ydf aVgNzM27wkK+AzOUDUz1ORDQ4VIPWIo1dXZpHCOU0bMWg== X-Received: by 127.0.0.2 with SMTP id zT1mYY7687511xzeRpWDNRRI; Thu, 10 Apr 2025 02:19:21 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.30181.1744276760470881835 for ; Thu, 10 Apr 2025 02:19:20 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DDA01106F; Thu, 10 Apr 2025 02:19:19 -0700 (PDT) X-Received: from [10.34.125.37] (e126645.nice.arm.com [10.34.125.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A22583F6A8; Thu, 10 Apr 2025 02:19:18 -0700 (PDT) Message-ID: <682dc0ef-849b-4d94-b86e-1a0b80518a13@arm.com> Date: Thu, 10 Apr 2025 11:19:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] ACPI table generator unit test To: Ard Biesheuvel , devel@edk2.groups.io, yodagump@google.com, Sami Mujawar Cc: Paul Fagerburg References: <6352.1743111843323531312@groups.io> <13400.1744226252159153109@groups.io> From: "PierreGondois via groups.io" In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 10 Apr 2025 02:19:20 -0700 Resent-From: pierre.gondois@arm.com Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ti645DFtucUwpqqcGd2NAq5cx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=JqMVlKAk; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Hello Ard, Sophia, On 4/10/25 08:58, Ard Biesheuvel wrote: > cc Sami and Pierre >=20 > On Wed, 9 Apr 2025 at 21:17, Sophia Wang via groups.io > wrote: >> >> Gentle ping on this thread. >> >> As Paul mentioned, there are only two non-static functions for ACPI tabl= e generator - AcpiHmatLibConstructor() and >> AcpiHmatLibDestructor() >> >> In order to do the unit test, we need to expose at least one STATIC to b= e non-STATIC. >> CONST >> ACPI_TABLE_GENERATOR HmatGenerator. >> >> So we can use >> https://github.com/tianocore/edk2/pull/10833/commits/4eeeb1434820718ace1= 670d9429a867fe5e8c9b7 >> to register HMAT generator (or other generators). >> >> Currently https://github.com/tianocore/edk2/pull/10833/commits/4eeeb1434= 820718ace1670d9429a867fe5e8c9b7 solution is not functional given no functio= n call on RegisterAcpiTableGenerator(). I'm not sure I understand why the solution for the DBG2 is not functional. It seems to work for me with the following command line: $ stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=3DGCC5 -a X64 -p = DynamicTablesPkg GuidCheck=3Dskip HostUnitTestDscCompleteCheck=3Dskip CharE= ncodingCheck=3Dskip CompilerPlugin=3Dskip SpellCheck=3Dskip LibraryClassChe= ck=3Dskip LicenseCheck=3Dskip DscCompleteCheck=3Dskip DependencyCheck=3Dski= p EccCheck=3Dskip With Jeff's patch (i.e. the PR you linked), the RegisterAcpiTableGenerator(= ) function is mocked to save a pointer to the generator. Once the generator is registered, it is possible to call the BuildAcpiTable= Ex() callback for instace: https://github.com/jbrasen/edk2/blob/4eeeb1434820718ace1670d9429a867fe5e8c9= b7/DynamicTablesPkg/Library/Acpi/Common/AcpiDbg2Lib/GoogleTest/Dbg2Generato= rGoogleTest.cpp#L354 >> >> I guess we all need to wait for upstream's decision on STATIC and NON_ST= ATIC exposure for ACPI table generator unit test. >>=20 -=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 (#121255): https://edk2.groups.io/g/devel/message/121255 Mute This Topic: https://groups.io/mt/111930977/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-