Skip to content

tests: Add zstd:chunked pull integration test - #384

Merged
cgwalters merged 2 commits into
composefs:mainfrom
andrewdunndev:test/zstd-chunked-integration
Aug 26, 2026
Merged

tests: Add zstd:chunked pull integration test#384
cgwalters merged 2 commits into
composefs:mainfrom
andrewdunndev:test/zstd-chunked-integration

Conversation

@andrewdunndev

Copy link
Copy Markdown
Contributor

Adds the zstd:chunked integration coverage flagged in review on #381: build the same deterministic OCI layout tests::cli pins, recompress it to zstd:chunked with skopeo, assert the manifest really carries the zstd:chunked TOC annotation, pull it through cfsctl oci pull oci:, and assert the imported composefs image ID is byte-identical to the same content pulled as plain gzip. This is regression coverage for the decode failure tracked in #383. Skips when skopeo is absent or its copy rejects zstd:chunked, mirroring tests::old_format.

Verified in a VM with skopeo available: the test executes the real path (not the skip), fails with the multi-frame decode fix reverted, and passes on top of #381 with no change to the rest of the suite.

Based on #381, so the diff shows its commit until it merges; only the last commit is new here. I'll rebase onto main once #381 lands.

Generated-by: AI. I am familiar with the decode change under test and reviewed this carefully.

zstd:chunked layers are multi-frame zstd streams (one frame per chunk,
plus skippable framing metadata), and gzip layers may legally contain
multiple members. The decoders stop at the first frame or member
boundary, so such layers import a truncated tar and fail with
"unexpected EOF reading tar entry" (bootc-dev/bootc#2408).

Enable multiple_members(true) on both decoders so the full stream
decodes; libzstd skips skippable frames natively at any position. This
is full-pull correctness only: nothing exploits the chunked TOC for
partial pulls, which remains composefs#137.

Raise the async-compression floor to 0.4.43, which fixed an infinite
loop on a corrupt later frame with multiple_members enabled
(Nullus157/async-compression#470); older versions could hang on a
malformed blob once the flag is on.

Generated-by: AI
Signed-off-by: Andrew Dunn <andrew@dunn.dev>
zstd:chunked layers are inherently multi-frame (one zstd frame per
chunk, plus skippable TOC framing), so the decode fix ("oci: Decode
multi-frame compressed layers") was exactly the case this format
needed, but it shipped with no zstd:chunked-specific coverage. cgwalters flagged this gap on composefs#381 ("we are definitely
missing integration tests w/ zstd:chunked"), tracked as composefs#383.

Adds test_zstd_chunked_pull: builds the same deterministic OCI layout
tests::cli::test_oci_pull_and_inspect uses, recompresses it to
zstd:chunked with skopeo (--dest-force-compress-format, so the result
can't silently stay gzip), asserts the produced manifest carries the
zstd-chunked TOC annotation (so the fixture can't silently degrade to
plain zstd either), pulls it through the same cfsctl oci pull oci:
path the other OCI-layout tests use, and asserts the resulting
composefs image ID is byte-identical to OCI_LAYOUT_COMPOSEFS_ID, the
same content pulled as plain gzip. Before the multi-frame fix this
would either fail the import or reproduce a different ID, since the
decoder stopped at the first frame boundary.

Gated on skopeo being present (mirrors tests::old_format's
have_skopeo()); also skips gracefully if the installed skopeo's copy
rejects --dest-compress-format zstd:chunked.

Generated-by: AI
Signed-off-by: Andrew Dunn <andrew@dunn.dev>
@andrewdunndev
andrewdunndev force-pushed the test/zstd-chunked-integration branch from 47d0859 to 96f87f9 Compare August 25, 2026 00:45
@cgwalters
cgwalters enabled auto-merge August 25, 2026 14:25
@cgwalters
cgwalters added this pull request to the merge queue Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 25, 2026
@cgwalters
cgwalters added this pull request to the merge queue Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 25, 2026
@cgwalters
cgwalters added this pull request to the merge queue Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 25, 2026
@cgwalters
cgwalters added this pull request to the merge queue Aug 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 26, 2026
@cgwalters
cgwalters added this pull request to the merge queue Aug 26, 2026
Merged via the queue into composefs:main with commit 4850802 Aug 26, 2026
19 checks passed
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