summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/GptLib/UnitTest/GptLibUnitTestCommon.h
AgeCommit message (Collapse)AuthorFilesLines
2026-07-21MdeModulePkg/GptLib: Add host-based unit tests for valid GPT behaviorRichard Lyu1-0/+110
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>