Repository navigation
test(uts): port hardlinks.test INC_RECURSE scenario to nextest - #5950
Merged
Merged
Conversation
3 tasks
Adds a workspace integration test that pins the upstream testsuite/hardlinks.test scenario end-to-end under INC_RECURSE. Covers three escalating shapes lifted from the upstream script: - Flat hardlink pair (name1/name2/name3 share an inode, name4 is an independent copy) survives -aH --inc-recursive round-trip with inode + nlink invariants. - Hardlink spanning a deep subdirectory under INC_RECURSE: top-level name1 + subdir/down/deep/new-file share an inode at the destination across generator/sender segment boundaries. - --link-dest re-run hardlinks every locally-inherited entry to the basis tree, preserving the source's name1/name2 relationship transitively through the link-dest inode. Runtests.py runs hardlinks.test through continue-on-error CI plumbing, so per-test regressions on that path do not block PRs. Lifting the scenario into a native nextest integration test mirrors the UTS-NEXTEST-EDGE pattern (.f daemon-munge, .h delete-missing-args, .i chdir-symlink-race, .k atimes/crtimes, .l daemon-refuse, .m link-dest-module-escape, .n compress-zlib-insert) so it runs as a required check on every PR. Upstream references: - testsuite/hardlinks.test (canonical 3.4.4 copy) - hlink.c::match_hard_links() - leader/follower assignment under INC_RECURSE - flist.c XMIT_HLINK_FIRST encoding - generator.c / receiver.c hard_link_one() / hard_link_cluster() Test gated on cfg(unix) - Windows hardlink semantics through MetadataExt::ino() differ; sibling UTS-NEXTEST-EDGE tests use the same gate.
oferchen
force-pushed
the
test/uts-nextest-hardlinks-inc-recurse
branch
from
June 19, 2026 03:42
5aa69fd to
cdec5b5
Compare
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* test: port hardlinks.test INC_RECURSE scenario to nextest Adds a workspace integration test that pins the upstream testsuite/hardlinks.test scenario end-to-end under INC_RECURSE. Covers three escalating shapes lifted from the upstream script: - Flat hardlink pair (name1/name2/name3 share an inode, name4 is an independent copy) survives -aH --inc-recursive round-trip with inode + nlink invariants. - Hardlink spanning a deep subdirectory under INC_RECURSE: top-level name1 + subdir/down/deep/new-file share an inode at the destination across generator/sender segment boundaries. - --link-dest re-run hardlinks every locally-inherited entry to the basis tree, preserving the source's name1/name2 relationship transitively through the link-dest inode. Runtests.py runs hardlinks.test through continue-on-error CI plumbing, so per-test regressions on that path do not block PRs. Lifting the scenario into a native nextest integration test mirrors the UTS-NEXTEST-EDGE pattern (.f daemon-munge, .h delete-missing-args, .i chdir-symlink-race, .k atimes/crtimes, .l daemon-refuse, .m link-dest-module-escape, .n compress-zlib-insert) so it runs as a required check on every PR. Upstream references: - testsuite/hardlinks.test (canonical 3.4.4 copy) - hlink.c::match_hard_links() - leader/follower assignment under INC_RECURSE - flist.c XMIT_HLINK_FIRST encoding - generator.c / receiver.c hard_link_one() / hard_link_cluster() Test gated on cfg(unix) - Windows hardlink semantics through MetadataExt::ino() differ; sibling UTS-NEXTEST-EDGE tests use the same gate. * style: alphabetise tempfile use group for rustfmt
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
Adds a workspace integration test that pins the upstream
testsuite/hardlinks.testscenario end-to-end under INC_RECURSE.Closes UTS-NEXTEST-EDGE.j by lifting the upstream script into a native
nextest test so per-test regressions are caught as required PR checks
rather than slipping through the
runtests.pycontinue-on-error: trueCI plumbing.
The new test (
crates/transfer/tests/uts_nextest_hardlinks_inc_recurse.rs)covers three escalating shapes from upstream
target/interop/upstream-src/rsync-3.4.4/testsuite/hardlinks.test:name1/name2/name3share an inode whilename4(an independentcp) stays distinct. Asserts inode equality,nlink >= 3on the shared trio, andnlink == 1on the independentcopy after a
-aH --inc-recursiveround-trip.top-level
name1andsubdir/down/deep/new-fileshare an inode atthe destination across generator/sender segment boundaries, with
enough touch-files in
subdir/to put the deep path in a separategenerator segment.
--link-destre-run inherits hardlinks from the basis - secondtransfer must hardlink each entry into
chkdir/instead ofallocating fresh inodes; the source's
name1/name2relationship ispreserved transitively through the link-dest basis, and basis
nlinkgrows to reflect the new link-dest references.Mirrors the sibling UTS-NEXTEST-EDGE ports (
.fdaemon-munge,.hdelete-missing-args,
.ichdir-symlink-race,.katimes/crtimes,.ldaemon-refuse,.mlink-dest-module-escape,.ncompress-zlib-insert): inline
locate_oc_rsync()helper, skipgracefully when the binary is absent,
cfg(unix)gate (WindowsMetadataExt::ino()is unavailable to std, and NTFS hardlinksemantics diverge).
Upstream references
testsuite/hardlinks.test(canonical 3.4.4 copy)hlink.c::match_hard_links()- leader/follower assignment after thefile list sort that INC_RECURSE relies on
flist.cXMIT_HLINK_FIRSTflag wire encodinggenerator.c/receiver.chard_link_one()/hard_link_cluster()Test plan
cargo fmt --all -- --checkclean on the new fileWindows excluded by
#![cfg(unix)])target/whenCARGO_BIN_EXE_oc-rsyncis not injected (matches sibling tests)