Repository navigation
test: port compress-zlib-insert buffered-window overflow to nextest - #5893
Merged
Merged
Conversation
Pins the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via the public map_file API. Mirrors the upstream testsuite/compress-zlib-insert_test.py scenario (issue #951) at unit-test scope: a sub-MAX_MAP_SIZE basis must round-trip through map_ptr without tripping the "exceeds buffer length" guard, and the clamp must hold on cached re-entry, sliding-window walks, and the exact-fit boundary. Inline tests in crates/transfer/src/map_file/buffered.rs already cover the clamp invariant against fabricated state. This integration test pins the contract the four production map_ptr call sites depend on (token_loop.rs, response.rs, sync.rs, applicator.rs).
oferchen
force-pushed
the
test/uts-nextest-compress-zlib-insert
branch
from
June 17, 2026 19:22
8d63241 to
4a7eb3f
Compare
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…5893) Pins the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via the public map_file API. Mirrors the upstream testsuite/compress-zlib-insert_test.py scenario (issue #951) at unit-test scope: a sub-MAX_MAP_SIZE basis must round-trip through map_ptr without tripping the "exceeds buffer length" guard, and the clamp must hold on cached re-entry, sliding-window walks, and the exact-fit boundary. Inline tests in crates/transfer/src/map_file/buffered.rs already cover the clamp invariant against fabricated state. This integration test pins the contract the four production map_ptr call sites depend on (token_loop.rs, response.rs, sync.rs, applicator.rs).
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.
Summary
crates/transfer/tests/uts_18_compress_zlib_insert_buffered_window.rs(UTS-NEXTEST-EDGE.n): integration test pinning the BufferedMap window-length clamp (UTS-18.g.1/.g.2/.g.3) via the publictransfer::map_file::BufferedMapAPI.testsuite/compress-zlib-insert_test.pyscenario (issue Handle unbracketed IPv6 daemon operands #951) at unit-test scope. The historical defect surfaced as"exceeds buffer length"on a legitimate full-filemap_ptrwheneverfile_size < MAX_MAP_SIZE(256 KiB) -window_lenover-claimedmax_windowinstead of clamping tofile_size - window_start. UTS-18.g re-derived the clamp at the single assignment site incrates/transfer/src/map_file/buffered.rs::load_window.Coverage added
Inline unit tests under
crates/transfer/src/map_file/buffered.rsalready cover the clamp invariant against fabricated state (load_window_clamps_window_len_to_remaining_file_bytes,negative_bounds::buffered_map_slice_rejects_extending_past_end, etc.). This integration test pins the public API contract the four productionmap_ptrcall sites depend on (token_loop.rs,response.rs,sync.rs,applicator.rs):map_ptron a 48128-byte basis (the production crash math) returnsOkwith byte-identical contents.Ok- the clamp holds on initial load AND on cached re-entry.map_ptrwhoseoffset+lenwalks past EOF returnsErr(UnexpectedEof), never panics on a buffer-index out-of-range.file_size == MAX_MAP_SIZEround-trips through the same API.Lineage
testsuite/compress-zlib-insert_test.py(issue Handle unbracketed IPv6 daemon operands #951).fileio.c::map_ptr()lines 236-279.docs/audits/uts-nextest-edge-a-runtests-inventory.mdrow 26 (compress-zlib-insert).Test plan
uts_18_compress_zlib_insert_buffered_window.rs.