Repository navigation
tests: fixed chunker reading from a pipe / FIFO - #10568
Merged
ThomasWaldmann merged 1 commit intoOct 29, 2026
Merged
ThomasWaldmann merged 1 commit into
ThomasWaldmann merged 1 commit into
Conversation
Reading via the OS-level file handle of a pipe gives short reads and posix_fadvise() fails with ESPIPE there (e.g. on Linux). master handles both (short reads: borgbackup#10166, posix_fadvise errors: safe_fadvise), but no test covered the fixed chunker reading from a pipe. - fixed_test: chunk a pipe's file handle with ChunkerFixed. - test_create_read_special_big_fifo: also run it with the fixed chunker. See borgbackup#10565. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10568 +/- ##
==========================================
+ Coverage 89.34% 89.35% +0.01%
==========================================
Files 104 104
Lines 20091 20091
Branches 3154 3154
==========================================
+ Hits 17950 17953 +3
+ Misses 1484 1481 -3
Partials 657 657 ☔ View full report in Codecov by Harness. |
This was referenced Oct 29, 2026
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.
Adds tests for the fixed chunker reading from a pipe / FIFO, see #10565.
Reading via the OS-level file handle of a pipe gives short reads, and
posix_fadvise()fails withESPIPEthere (e.g. on Linux). master already handles both: short reads since #10166, andposix_fadvise()errors viasafe_fadvise(). But no test covered the fixed chunker reading from a pipe. borg 1.4 and 1.2 had both bugs: #10563 / #10564.fixed_test.py: newtest_chunkify_pipe, chunks a pipe's file handle withChunkerFixed, with a writer that pauses between bursts.test_create_read_special_big_fifo: now also runs with--chunker-params=fixed,1048576.Checked on Linux: with the bare
os.posix_fadvise()call put back intodread(),test_chunkify_pipefails withOSError: [Errno 29] Illegal seek; with the current code all tests pass.🤖 Generated with Claude Code