testsuite: decouple legacyrepository_test from RepoObj, refs #8572#9687
Merged
ThomasWaldmann merged 2 commits intoMay 31, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9687 +/- ##
=======================================
Coverage 83.87% 83.88%
=======================================
Files 93 93
Lines 15586 15586
Branches 2335 2335
=======================================
+ Hits 13073 13074 +1
Misses 1785 1785
+ Partials 728 727 -1 ☔ View full report in Codecov by Sentry. |
ThomasWaldmann
requested changes
May 30, 2026
Member
ThomasWaldmann
left a comment
There was a problem hiding this comment.
The idea is:
- fchunk(data, meta) -> chunk_content -> repo put
- repo get -> pchunk -> data, meta
That fchunk/pchunk is just a simplified way to do something close to what borg usually does, but without having to set up compression and encryption.
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.
Description
legacyrepository_testwas importingRepoObj(borg 2) to build test blobs infchunk/pchunk. That coupling was wrong: borg 1.x blobs have a 1-byte compressor type header followed by the payload, not theStruct("<II")meta/data header from borg 2.Remove the
RepoObjimport.fchunknow prepends a 1-byteCNONEtype header (0x00) to simulate the generic borg 1.x blob format without real compression.pchunkstrips that byte.test_max_data_sizeupdated to account for the 1-byte overhead.This way, changes to the borg 2 blob format (e.g.
OBJ_MAGICin #9684) no longer touch the legacy test helpers.refs #8572
Checklist
master(or maintenance branch if only applicable there)toxor the relevant test subset)