From: "PierreGondois via groups.io" <pierre.gondois=arm.com@groups.io>
To: Ard Biesheuvel <ardb@kernel.org>,
devel@edk2.groups.io, yodagump@google.com,
Sami Mujawar <sami.mujawar@arm.com>
Cc: Paul Fagerburg <pfagerburg@google.com>
Subject: Re: [edk2-devel] ACPI table generator unit test
Date: Thu, 10 Apr 2025 11:19:13 +0200 [thread overview]
Message-ID: <682dc0ef-849b-4d94-b86e-1a0b80518a13@arm.com> (raw)
In-Reply-To: <CAMj1kXFqkVjmMoDPNDkH1Rv6p8_vYxJtEbSCL1QR1gRr3D8+xw@mail.gmail.com>
Hello Ard, Sophia,
On 4/10/25 08:58, Ard Biesheuvel wrote:
> cc Sami and Pierre
>
> On Wed, 9 Apr 2025 at 21:17, Sophia Wang via groups.io
> <yodagump=google.com@groups.io> wrote:
>>
>> Gentle ping on this thread.
>>
>> As Paul mentioned, there are only two non-static functions for ACPI table generator - AcpiHmatLibConstructor() and
>> AcpiHmatLibDestructor()
>>
>> In order to do the unit test, we need to expose at least one STATIC to be non-STATIC.
>> CONST
>> ACPI_TABLE_GENERATOR HmatGenerator.
>>
>> So we can use
>> https://github.com/tianocore/edk2/pull/10833/commits/4eeeb1434820718ace1670d9429a867fe5e8c9b7
>> to register HMAT generator (or other generators).
>>
>> Currently https://github.com/tianocore/edk2/pull/10833/commits/4eeeb1434820718ace1670d9429a867fe5e8c9b7 solution is not functional given no function 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=GCC5 -a X64 -p DynamicTablesPkg GuidCheck=skip HostUnitTestDscCompleteCheck=skip CharEncodingCheck=skip CompilerPlugin=skip SpellCheck=skip LibraryClassCheck=skip LicenseCheck=skip DscCompleteCheck=skip DependencyCheck=skip EccCheck=skip
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 BuildAcpiTableEx() callback for instace:
https://github.com/jbrasen/edk2/blob/4eeeb1434820718ace1670d9429a867fe5e8c9b7/DynamicTablesPkg/Library/Acpi/Common/AcpiDbg2Lib/GoogleTest/Dbg2GeneratorGoogleTest.cpp#L354
>>
>> I guess we all need to wait for upstream's decision on STATIC and NON_STATIC exposure for ACPI table generator unit test.
>>
-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2025-04-10 9:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 22:56 [edk2-devel] ACPI table generator unit test yodagump via groups.io
2025-03-27 13:36 ` Sami Mujawar via groups.io
2025-03-27 16:55 ` Sophia Wang via groups.io
2025-04-02 16:47 ` Paul Fagerburg via groups.io
2025-04-09 19:17 ` Sophia Wang via groups.io
2025-04-10 6:58 ` Ard Biesheuvel via groups.io
2025-04-10 9:19 ` PierreGondois via groups.io [this message]
2025-04-10 16:46 ` Sophia Wang via groups.io
2025-04-15 15:30 ` PierreGondois via groups.io
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=682dc0ef-849b-4d94-b86e-1a0b80518a13@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox