Skip to content

Conversation

cgwalters
Copy link
Collaborator

A lot of Assisted-by: Claude Code here, but the goal is to add a test case for #188 that can just have its [ignore] removed.

And use this to add lots of unit tests.

Assisted-by: Claude Code
Signed-off-by: Colin Walters <[email protected]>
…ry bug

Add a comprehensive regression test that reproduces the bug fixed in PR
inline directory sections as DirectoryBlock, causing a panic.

The test generates an erofs image on-the-fly using C mkcomposefs, which
(unlike the Rust implementation) creates directories with empty inline
sections. This reveals a key difference: the C implementation stores only
the parent reference without . and .. entries when a directory is empty,
while the Rust implementation always includes those entries.

The test demonstrates both:
1. A synthetic case showing DirectoryBlock::n_entries() panics on empty
   inline data
2. The actual bug triggered by collect_objects() on the C-generated image

The test is marked #[ignore] so it doesn't break CI until PR containers#188's fix
is applied. When run with --ignored, it passes by catching the expected
panics.

Asissted-by: Claude Code
Signed-off-by: Colin Walters <[email protected]>
@cgwalters
Copy link
Collaborator Author

Hmm looks like there's CI gardening to do here unrelated to extant PRs

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.

1 participant