Skip to content

tests: fixed chunker reading from a pipe / FIFO - #10568

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:fixed-chunker-fadvise-espipe
Oct 29, 2026
Merged

ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:fixed-chunker-fadvise-espipe

Conversation

@ThomasWaldmann

Copy link
Copy Markdown
Member

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 with ESPIPE there (e.g. on Linux). master already handles both: short reads since #10166, and posix_fadvise() errors via safe_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: new test_chunkify_pipe, chunks a pipe's file handle with ChunkerFixed, 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 into dread(), test_chunkify_pipe fails with OSError: [Errno 29] Illegal seek; with the current code all tests pass.

🤖 Generated with Claude Code

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>
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.35%. Comparing base (144a83b) to head (184cae0).
⚠️ Report is 5 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
ThomasWaldmann merged commit b84a5bf into borgbackup:master Oct 29, 2026
25 checks passed
@ThomasWaldmann
ThomasWaldmann deleted the fixed-chunker-fadvise-espipe branch October 29, 2026 22:24
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.

1 participant