Repository navigation
test(transfer): cover 8 symlink-dirlink-basis topologies - #5871
Merged
Merged
Conversation
oferchen
force-pushed
the
fix/uts-dd-symlink-dirlink-basis
branch
from
June 17, 2026 14:37
54b3195 to
216c01c
Compare
Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
oferchen
force-pushed
the
fix/uts-dd-symlink-dirlink-basis
branch
from
June 17, 2026 14:45
216c01c to
f1fb04a
Compare
1 of 2 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… (#5871) Pins the receiver-side wiring that the upstream rsync 3.4.4 testsuite `symlink-dirlink-basis` test exercises against -K/--keep-dirlinks. The chmod dirfd-sandbox bypass (#5793) plus the compact `K` flag parser wire-up (#5853) close the failure; this test file is the regression coverage for both halves together. Each test mirrors one of the eight Test N scenarios in `testsuite/symlink-dirlink-basis.test` (Issue #715): basic, compressed, nested, --backup, --inplace, top-level (negative control), proto28 --partial-dir, and proto28 basic. The negative control catches a parser regression that would silently set keep_dirlinks for the non-symlinked top-level case. Pins both halves of the chain: - ParsedServerFlags::parse recognises the compact `K` byte from the server-side flag string the client emits in every topology. - The parsed flag survives MetadataOptions::with_keep_dirlinks, which is what chmod_path_honoring_keep_dirlinks consults at apply time. Upstream sources of truth: - target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.test - target/interop/upstream-src/rsync-3.4.1/options.c:688 (-K mapping) - target/interop/upstream-src/rsync-3.4.1/generator.c:1344 (link_stat(fname, &sx.st, keep_dirlinks && is_dir))
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
symlink-dirlink-basistopology, pinning that the receiver wiring for-K/--keep-dirlinkssurvives end-to-end through the compact server-flag parser and theMetadataOptionsbuilder.Kparser wire-up (PR fix(transfer): parse compact -K to honour --keep-dirlinks on receiver #5853) are the fix; this PR encodes the upstream scenarios so the chain cannot silently break again.-K) that catches a parser regression which would spontaneously setkeep_dirlinksfrom sibling bytes.Root-cause conclusion
The upstream rsync 3.4.4
symlink-dirlink-basis.test(Issue #715) exercises 8 scenarios where the destination's parent directory is a symlink to the real directory; with--keep-dirlinksthe receiver must follow the parent symlink at chmod time instead of being refused bysecure_chmod_at. PR #5793 introducedchmod_path_honoring_keep_dirlinksto bypass the dirfd sandbox viastd::fs::set_permissions, and PR #5853 wired the compactKbyte throughParsedServerFlags::parseso the receiver setsMetadataOptions::with_keep_dirlinks(true). Both halves are required for the test to pass; this PR pins the joint invariant for all 8 topologies.Test plan
cargo fmt --all(workspace formatted)cargo nextest run -p transfer --all-features -E 'test(symlink_dirlink)'Files touched
crates/transfer/tests/uts_dd_symlink_dirlink_basis_topologies.rs(new, 145 lines)Upstream references
target/interop/upstream-src/rsync-3.4.4/testsuite/symlink-dirlink-basis.testtarget/interop/upstream-src/rsync-3.4.1/options.c:688(-Kmapping)target/interop/upstream-src/rsync-3.4.1/generator.c:1344(link_stat(fname, &sx.st, keep_dirlinks && is_dir))