Re: [PATCH 6/6] test: py: gpt: Test the GPT layout on a device with 4096-byte blocks
Simon Glass <[email protected]> Tue, 4 Aug 2026 07:05:59 -0600
| Newsgroups | gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <CAFLszTgn_fY1d_Zktw+3iXLv+JPvk14--Cexbs631F2h57o5VQ@mail.gmail.com> |
On 2026-07-31T12:39:59, Alexey Charkov <[email protected]> wrote: > test: py: gpt: Test the GPT layout on a device with 4096-byte blocks > > Bind a blank image with a 4096-byte logical block size, let U-Boot write a > GPT to it, and then check the result both through 'part list' and by > unpacking the primary and backup headers straight out of the image. The > interesting assertion is that the backup partition entry array ends > immediately before the backup header in the last block, which is what > regresses when the array size is computed with a hardcoded block count. > > No sgdisk is needed since U-Boot creates the table itself, so unlike the > other tests here this one has no requiredtool marker. The number of entries > comes from the build config rather than being hardcoded to 128, so the > expected LBAs are recomputed for builds that set > CONFIG_EFI_PARTITION_ENTRIES_NUMBERS differently. > > Signed-off-by: Alexey Charkov <[email protected]> > > test/py/tests/test_gpt.py | 115 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 115 insertions(+) Reviewed-by: Simon Glass <[email protected]>