Skip to content

gpt: test round-trip of two partitions with the same name#414

Merged
deitch merged 1 commit into
diskfs:masterfrom
eriknordmark:gpt-duplicate-name
Jul 10, 2026
Merged

gpt: test round-trip of two partitions with the same name#414
deitch merged 1 commit into
diskfs:masterfrom
eriknordmark:gpt-duplicate-name

Conversation

@eriknordmark

Copy link
Copy Markdown
Contributor

A GPT partition is keyed by its unique GUID; the name field carries no
uniqueness constraint. A consumer that must select one of two
identically-named partitions therefore has to rely on the GUID surviving a
write/read round-trip. This adds a test that writes two "EFI System"
partitions with distinct GUIDs, reads the table back, and asserts the
labels stay identical while the per-entry GUIDs are preserved and distinct.

Test-only; no library change. Draft/WIP pending review — motivated by
downstream partition-selection-by-GUID work.

A GPT partition is keyed by its unique GUID; the name field carries no
uniqueness constraint, so a consumer that must pick one of two
identically-named partitions has to rely on the GUID. Add a test that
writes two "EFI System" partitions with distinct GUIDs, reads the table
back, and asserts the labels stay identical while the per-entry GUIDs are
preserved and distinct.

Signed-off-by: eriknordmark <erik@zededa.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eriknordmark
eriknordmark marked this pull request as ready for review July 8, 2026 19:05
@eriknordmark

Copy link
Copy Markdown
Contributor Author

@deitch this is ready for review — a small regression guard that two GPT partitions sharing a name but with distinct GUIDs round-trip through Table.Write/Read with per-entry GUIDs preserved. Groundwork for selecting a partition by GUID when labels are not unique. Thanks!

@deitch
deitch merged commit 91b8141 into diskfs:master Jul 10, 2026
20 checks passed
@eriknordmark
eriknordmark deleted the gpt-duplicate-name branch July 21, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants