public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "yodagump via groups.io" <yodagump=google.com@groups.io>
To: devel@edk2.groups.io
Subject: [edk2-devel] ACPI table generator unit test
Date: Thu, 20 Mar 2025 15:56:55 -0700	[thread overview]
Message-ID: <ETLW.1742511415727458917.AWEz@groups.io> (raw)

[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]

Hi,

I plan to use EDK2 unit test framework (https://github.com/SophiaWang-Google/edk2/tree/master/UnitTestFrameworkPkg) to test ACPI table generator, such as https://github.com/tianocore/edk2/blob/master/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c

However, ACPI table generator only has two non-static function exposed:
EFI_STATUS
EFIAPI
AcpiGtdtLibConstructor (
IN  EFI_HANDLE        ImageHandle,
IN  EFI_SYSTEM_TABLE  *SystemTable
)

EFI_STATUS
EFIAPI
AcpiGtdtLibDestructor (
IN  EFI_HANDLE        ImageHandle,
IN  EFI_SYSTEM_TABLE  *SystemTable
)

So if we want to use GoogleTest gMock to unit test ACPI table generator, I guess we need to expose API :
STATIC
EFI_STATUS
EFIAPI
BuildGtdtTable (
IN  CONST ACPI_TABLE_GENERATOR                  *CONST  This,
IN  CONST CM_STD_OBJ_ACPI_TABLE_INFO            *CONST  AcpiTableInfo,
IN  CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL  *CONST  CfgMgrProtocol,
OUT       EFI_ACPI_DESCRIPTION_HEADER          **CONST  Table
)
to non-static

Please let me whether this is the approach upstream target for, or any better solutions on this?

Thank you,
Sophia


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121226): https://edk2.groups.io/g/devel/message/121226
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]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 2692 bytes --]

             reply	other threads:[~2025-03-27  4:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 22:56 yodagump via groups.io [this message]
2025-03-27 13:36 ` [edk2-devel] ACPI table generator unit test Sami Mujawar via groups.io
2025-03-27 16:55   ` Sophia Wang 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=ETLW.1742511415727458917.AWEz@groups.io \
    --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