Skip to content

test(transfer): sender INC_RECURSE under flist io_error (ISI.f) - #4869

Merged
oferchen merged 3 commits into
masterfrom
test/isi-f-sender-flist-io-error
May 24, 2026
Merged

oferchen merged 3 commits into
masterfrom
test/isi-f-sender-flist-io-error

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

Failure-mode test for the sender-side INC_RECURSE path. A chmod 0000 subdirectory inside the source tree forces the walk to hit EACCES on opendir mid-enumeration. The test asserts the upstream-compatible recovery contract that ISI.c/.d's clean-path harnesses leave unexercised:

  • record_io_error accumulates IOERR_GENERAL instead of aborting the walk (generator/file_list/walk.rs::scan_directory_batched).
  • A partial flist with the readable entries is still sent, with the accumulated io_error bitfield written into the flist end marker (generator/protocol_io.rs::send_file_list -> flist.c:2518 write_int(f, io_error)).
  • Both peers exit RERR_PARTIAL (23) instead of crashing with a stream-format / protocol error.
  • Readable sibling directories still arrive byte-identical at the destination.
  • The poisoned subtree does not leak any files into the destination.
  • Sender stderr surfaces the failed directory so operators can diagnose the partial transfer (flist.c:1842 opendir %s failed).

Why it matters

INC_RECURSE dispatches sub-list segments lazily during the transfer loop. A regression that aborted the walk on the first unreadable directory would leave queued segments un-flushed and the receiver waiting on NDX_FLIST_EOF indefinitely - a hang or stream-IO error instead of the graceful partial transfer upstream guarantees. The v0.5.8 io_error accumulation work made this recovery possible; ISI.f is the regression seed for the sender-side INC_RECURSE path specifically.

Gating

  • #[cfg(all(unix, not(target_os = "macos"), feature = "sender-inc-recurse"))] - matches the rest of the ISI series; macOS / non-Linux have no target/interop/upstream-install tree.
  • Skips with skip: when running as root (DAC bypassed) or when the upstream rsync 3.4.1 binary is missing.

Test plan

  • CI green: fmt+clippy, nextest stable/macOS/Windows/musl.
  • Linux interop runners pick up the test under the sender-inc-recurse feature combination once the workspace feature is exercised in CI.

@github-actions github-actions Bot added the test label May 24, 2026
@oferchen
oferchen force-pushed the test/isi-f-sender-flist-io-error branch 2 times, most recently from 31e0427 to cadaa36 Compare May 24, 2026 16:26
@oferchen
oferchen force-pushed the test/isi-f-sender-flist-io-error branch from cadaa36 to bd487e2 Compare May 24, 2026 16:35
oferchen added 3 commits May 24, 2026 19:48
Failure-mode companion to the ISI.c/.d push-interop harnesses. A
chmod 0000 subdirectory inside the source tree forces the sender's
INC_RECURSE walk to hit EACCES on opendir mid-enumeration; the test
locks in the upstream-compatible recovery contract:

- record_io_error accumulates IOERR_GENERAL instead of aborting
- a partial flist with the readable entries is still sent
- io_error rides the flist end marker (flist.c:2518)
- both peers exit RERR_PARTIAL (23), not a stream-format error
- readable siblings still arrive byte-identical at the destination
- the poisoned subtree must not leak into the destination
- sender stderr surfaces the failed directory for diagnostics

Feature-gated #[cfg(feature = "sender-inc-recurse")] and Linux-only
to match the ISI series convention. Skips on root since DAC is
bypassed there.
@oferchen
oferchen force-pushed the test/isi-f-sender-flist-io-error branch from bd487e2 to 2087e55 Compare May 24, 2026 16:49
@oferchen
oferchen merged commit 9f4a683 into master May 24, 2026
57 of 58 checks passed
@oferchen
oferchen deleted the test/isi-f-sender-flist-io-error branch May 28, 2026 03:37
oferchen added a commit that referenced this pull request Aug 24, 2026
* test(transfer): sender INC_RECURSE under flist io_error (ISI.f)

Failure-mode companion to the ISI.c/.d push-interop harnesses. A
chmod 0000 subdirectory inside the source tree forces the sender's
INC_RECURSE walk to hit EACCES on opendir mid-enumeration; the test
locks in the upstream-compatible recovery contract:

- record_io_error accumulates IOERR_GENERAL instead of aborting
- a partial flist with the readable entries is still sent
- io_error rides the flist end marker (flist.c:2518)
- both peers exit RERR_PARTIAL (23), not a stream-format error
- readable siblings still arrive byte-identical at the destination
- the poisoned subtree must not leak into the destination
- sender stderr surfaces the failed directory for diagnostics

Feature-gated #[cfg(feature = "sender-inc-recurse")] and Linux-only
to match the ISI series convention. Skips on root since DAC is
bypassed there.

* style(transfer): apply rustfmt to inc_recurse_sender_flist_io_error_isi_f.rs

* ci(transfer): retrigger CI on ISI.f after master fmt fixup #4891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant