tmt: Add test switching to a zstd:chunked image - #2503
Open
cgwalters-bot wants to merge 1 commit into
Open
cgwalters-bot wants to merge 1 commit into
cgwalters-bot wants to merge 1 commit into
Conversation
cgwalters
approved these changes
Sep 25, 2026
The composefs backend used to fail to pull zstd:chunked images, because a zstd:chunked layer is a multi-frame zstd stream (with skippable frames for the table of contents) and the decoder stopped after the first frame. That was fixed in composefs-rs, but nothing here would have caught it or would catch a regression, since all our tests pull from containers-storage, which hands out uncompressed layers. Push a derived image with `--compression-format zstd:chunked` to an OCI directory and switch to it, which avoids needing a registry. composefs-rs reads OCI directories directly rather than via skopeo, but the layers go through the same decompressor as a registry pull. Layers already in the repository (i.e. all the base image ones) are skipped, so the one new layer must itself be multi-frame for this to test anything; it gets a bunch of small files, which zstd:chunked compresses into separate frames, and checksums to catch silent truncation. The test also checks the pushed manifest, so that it can't silently degrade into testing plain zstd or gzip. It runs for both backends, since it's cheap coverage for ostree too. Also drop the known-issue note about zstd:chunked pulls failing from the composefs docs, since the composefs-rs bump in 3024fa2 fixed that. Closes: bootc-dev#2408 Generated-by: AI Signed-off-by: Colin Walters <walters@verbum.org>
Contributor
Author
|
Rebased onto main; 1 commit, no content change. Generated-by: https://github.com/cgwalters/#llms |
cgwalters-bot
force-pushed
the
bot/test-zstd-chunked
branch
from
September 26, 2026 06:42
5dda177 to
3c52d16
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The composefs backend used to fail to pull zstd:chunked images ("unexpected
EOF reading tar entry", #2408): a zstd:chunked layer is a multi-frame zstd
stream, with skippable frames for the table of contents, and the decoder
stopped after the first frame. composefs-rs fixed that and main already pins
a fixed version, but none of our tests would catch a regression, since they
all pull from containers-storage, which hands out uncompressed layers.
This adds a tmt test (number 50) that builds a derived image, pushes it with
podman push --compression-format zstd:chunkedto an OCI directory(avoiding the need for a registry; composefs-rs reads OCI directories
directly rather than via skopeo, but the layers go through the same
decompressor as a registry pull), and
bootc switches to it, then checksthe new data after reboot. Layers already in the repository (all the base
image ones) are skipped on pull, so the single new layer has to be
multi-frame on its own for this to test anything: it gets 64 small random
files, which zstd:chunked compresses into separate frames, plus checksums to
catch silent truncation. The test also asserts that every layer in the
pushed manifest is zstd with the zstd:chunked annotation, so it can't
silently degrade into testing plain zstd or gzip. It runs on both backends,
since it's cheap coverage for ostree too.
Testing, on a 16-core RHEL 10 devspace, rebased on current main (centos-bootc
stream10 base):
just test-tmt switch-zstd-chunkedpassed on the composefsbackend (systemd-boot, BLS, ext4, unsealed) and on ostree, including the
post-reboot checksum and
bootc internals fsckchecks;cargo xtask update-generated direct --checkandjust validatepass. In an earlierrun, reverting the composefs-rs fix (zstd
multiple_members(true)) madethis test fail with the original "unexpected EOF reading tar entry", so it
does catch the bug.
It also drops the note in experimental-composefs.md saying zstd:chunked
pulls fail, since the composefs-rs bump in 3024fa2 fixed that.
Closes: #2408
The
Signed-off-by: Colin Walters <walters@verbum.org>on these commits was added on cgwalters's approval of the review draft: cgwalters-forge#7 (review)Generated-by: https://github.com/cgwalters/#llms