tests: Add EROFS digest stability tests#255
Conversation
allisonkarlitskaya
left a comment
There was a problem hiding this comment.
There's some similar testcases already in the same file which work via snapshotting with the debug dump (for easy diffability in case something changes)... those could also gain a hash output... and then maybe do something similar for this one too?
|
Thanks for looking at this! Yeah the insta-debug is definitely more debuggable vs checksum assertions, but OTOH if there was anything missing in our debug output (padding?) we could miss it. I think you're right though, adding checksums to those would be simple and helpful. Doing this is a bit trickier for the container-based integration tests as those are intentionally integration tests - they don't have access to the debug representation (though of course we could add one). In practice...if as we're developing the checksum differs, what I do in practice so far is look at the dumpfile output. Most of the time the bug lies in there, and even though we don't save the dumpfile in those tests, it's easy to get. |
a82ccf2 to
d180ec7
Compare
|
OK this is cleaner now. I previously pushed another commit to use the "infamous" special.dump here but...this reveals more bugs which I will take in later patches. This PR again is just to ensure we've nailed down exactly bit for bit the current erofs writer. |
| // `--bootable` is not supported. | ||
| const UBI10: ContainerImage = ContainerImage { | ||
| label: "ubi10", | ||
| image_ref: "docker://registry.access.redhat.com/ubi10/ubi:10.1-1772441712", |
There was a problem hiding this comment.
Do these ever get garbage collected? I assume not, but also I have no idea where I would find that written down somewhere as a guarantee.
There was a problem hiding this comment.
I am not aware of any docs, but e.g.
$ skopeo inspect -n docker://registry.access.redhat.com/ubi9/ubi:9.0.0-1468.1655190709 | from json | get Created
2022-06-14T07:23:19.154905Z
Which corresponds to the very first release of RHEL 9.0...so I think we're pretty safe here.
centos-bootc is more likely to get GC'd at some point.
Anyways I spawned an agent to look at a task of copying "fixture" images to ghcr.io/composefs/test-fixture-$x so if we actually hit some problem we can just do that.
There was a problem hiding this comment.
OK, rebased to use those images
There was a problem hiding this comment.
And now passing CI after I made them public
The digest stability tests in PR #255 reference pinned container images from upstream registries (registry.access.redhat.com, quay.io). This job makes it easy for us to mirror fixture images to our own namespace, just to double check they don't get GC'd. Ref: #255 (comment) Assisted-by: OpenCode (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
In preparation for some changes to the EROFS code (reader hardening, but also some support for original composefs v1 format), add tests which verify the exact digest of the EROFS we generate today. The container image references now point at ghcr.io/composefs mirrors (populated by ci/fixture-images.txt) rather than upstream registries, so tests won't break if upstream GCs old builds. Assisted-by: OpenCode (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
d180ec7 to
17f8431
Compare
In preparation for some changes to the EROFS code
(reader hardening, but also some support for original
composefs v1 format), add tests which verify the
exact digest of the EROFS we generate today.
Assisted-by: OpenCode (Claude Opus 4)