edk2/MdeModulePkg/Library/GptLib/UnitTest/GptLibUnitTestHost.inf
Richard Lyu 77585e5004 MdeModulePkg/GptLib: Add host-based unit tests for valid GPT behavior
Add the positive-path host-based tests for the shared GptLib parser
(extracted as part of the parser security hardening), ensuring the
tightened checks in PartitionValidGptTable(), PartitionCheckGptEntry()
and PartitionRestoreGptTable() do not falsely reject well-formed GPTs.

The tests run against an in-memory mock disk and cover accepted
primary/backup headers, boundary but legal header/entry sizes, correct
entry-status flagging on valid entries, and primary/backup restore
round-trips.

Signed-off-by: Richard Lyu <richard.lyu@suse.com>
2026-07-20 21:50:57 +00:00

40 lines
1 KiB
INI

## @file
# Host-based unit tests for GptLib.
#
# Exercises PartitionValidGptTable(), PartitionCheckGptEntry() and
# PartitionRestoreGptTable() against an in-memory mock disk, covering their
# behavior on well-formed GPT structures.
#
# Copyright (c) 2026, SUSE LLC. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x00010006
BASE_NAME = GptLibUnitTestHost
FILE_GUID = 2F5B4C8E-6D3A-4B1F-9E07-8A2C5D14E6B3
MODULE_TYPE = HOST_APPLICATION
VERSION_STRING = 1.0
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
GptLibUnitTestCommon.h
GptLibUnitTestCommon.c
GptLibUnitTest.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
GptLib
UnitTestLib