Skip to content

test(interop): INC_RECURSE sender fuzz against upstream rsync (#1863) - #4199

Merged
oferchen merged 3 commits into
masterfrom
test/inc-recurse-sender-fuzz-1863
May 17, 2026
Merged

oferchen merged 3 commits into
masterfrom
test/inc-recurse-sender-fuzz-1863

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds tests/inc_recurse_sender_fuzz_1863.rs, an opt-in fuzz harness that
    exercises the oc-rsync sender path with INC_RECURSE negotiated on, pushing
    randomised trees to upstream rsync 3.0.9 / 3.1.3 / 3.4.1 receivers and
    asserting byte-identical destinations via sha256.
  • Reuses the existing seedable PRNG, snapshot, and helper patterns from the
    live interop fuzzer (PR test(interop): live transfer fuzzer with seedable RNG (#1196) #4185 / tracker Prevent module burst from raising daemon bwlimit #1196).
  • No runtime env var or build toggle is needed. The CLI flag
    --inc-recursive flips ClientConfig::inc_recursive_send to true, which
    causes build_capability_string (the single source of truth in
    crates/transfer/src/setup/capability.rs) to include the 'i' capability
    in the -e string advertised to the peer.
  • The harness drives upstream rsync as the client and oc-rsync as
    --server --sender through bidirectional pipes, mimicking what an SSH
    transport would do. A lighter-weight local push pass guards the
    inc_recursive_send plumbing in environments without upstream rsync.
  • Both inc_recurse_sender_fuzz_smoke and inc_recurse_sender_fuzz_extended
    are #[ignore] so they only run via --run-ignored=all.

Reproducibility

All randomness flows through a single xorshift64* PRNG seeded by either
the system clock or OC_RSYNC_FUZZ_SEED. On failure the test prints the
seed and the exact reproducer command.

Test plan

  • CI fmt + clippy stay green
  • CI nextest (stable) stays green (the new tests are #[ignore], no
    coverage change on the default run)
  • Local opt-in run after upstream rsync is installed:
    OC_RSYNC_FUZZ_BUDGET_SECS=120 cargo nextest run --workspace \ -E 'test(inc_recurse_sender_fuzz)' --run-ignored=all
  • Skip path verified when target/interop/upstream-install/*/bin/rsync
    is absent (the test prints skip: and returns without failing).

@github-actions github-actions Bot added the test label May 16, 2026
oferchen added 3 commits May 17, 2026 06:43
Adds tests/inc_recurse_sender_fuzz_1863.rs, a sister harness to
live_interop_fuzz_1196.rs that focuses on the oc-rsync sender path with
INC_RECURSE ('i') negotiated on. Two `#[ignore]` smoke and extended
tiers generate random source trees, push them through both a local
oc-rsync invocation and a pipe-driven `--server --sender` against
upstream rsync 3.0.9/3.1.3/3.4.1 receivers, and assert byte-identical
destinations via sha256.

Runtime opt-in: `--inc-recursive` CLI flag (no env var or build toggle
required). The flag flips ClientConfig::inc_recursive_send to true,
which causes build_capability_string to include 'i' in the -e string
advertised to the peer.

Skips cleanly when no upstream rsync binary is available, mirroring the
behaviour of the existing live interop fuzzer.
@oferchen
oferchen force-pushed the test/inc-recurse-sender-fuzz-1863 branch from de4b0c4 to 0188e9d Compare May 17, 2026 03:43
@oferchen
oferchen merged commit 94b7648 into master May 17, 2026
37 checks passed
@oferchen
oferchen deleted the test/inc-recurse-sender-fuzz-1863 branch May 17, 2026 04:14
oferchen added a commit that referenced this pull request May 18, 2026
…#4199)

* test(interop): INC_RECURSE sender fuzz against upstream rsync (#1863)

Adds tests/inc_recurse_sender_fuzz_1863.rs, a sister harness to
live_interop_fuzz_1196.rs that focuses on the oc-rsync sender path with
INC_RECURSE ('i') negotiated on. Two `#[ignore]` smoke and extended
tiers generate random source trees, push them through both a local
oc-rsync invocation and a pipe-driven `--server --sender` against
upstream rsync 3.0.9/3.1.3/3.4.1 receivers, and assert byte-identical
destinations via sha256.

Runtime opt-in: `--inc-recursive` CLI flag (no env var or build toggle
required). The flag flips ClientConfig::inc_recursive_send to true,
which causes build_capability_string to include 'i' in the -e string
advertised to the peer.

Skips cleanly when no upstream rsync binary is available, mirroring the
behaviour of the existing live interop fuzzer.

* style(tests): apply rustfmt to inc_recurse_sender_fuzz_1863

* test(interop): remove unused gen_bool helper from fuzz harness
oferchen added a commit that referenced this pull request May 18, 2026
…#4199)

* test(interop): INC_RECURSE sender fuzz against upstream rsync (#1863)

Adds tests/inc_recurse_sender_fuzz_1863.rs, a sister harness to
live_interop_fuzz_1196.rs that focuses on the oc-rsync sender path with
INC_RECURSE ('i') negotiated on. Two `#[ignore]` smoke and extended
tiers generate random source trees, push them through both a local
oc-rsync invocation and a pipe-driven `--server --sender` against
upstream rsync 3.0.9/3.1.3/3.4.1 receivers, and assert byte-identical
destinations via sha256.

Runtime opt-in: `--inc-recursive` CLI flag (no env var or build toggle
required). The flag flips ClientConfig::inc_recursive_send to true,
which causes build_capability_string to include 'i' in the -e string
advertised to the peer.

Skips cleanly when no upstream rsync binary is available, mirroring the
behaviour of the existing live interop fuzzer.

* style(tests): apply rustfmt to inc_recurse_sender_fuzz_1863

* test(interop): remove unused gen_bool helper from fuzz harness
oferchen added a commit that referenced this pull request Aug 24, 2026
…#4199)

* test(interop): INC_RECURSE sender fuzz against upstream rsync (#1863)

Adds tests/inc_recurse_sender_fuzz_1863.rs, a sister harness to
live_interop_fuzz_1196.rs that focuses on the oc-rsync sender path with
INC_RECURSE ('i') negotiated on. Two `#[ignore]` smoke and extended
tiers generate random source trees, push them through both a local
oc-rsync invocation and a pipe-driven `--server --sender` against
upstream rsync 3.0.9/3.1.3/3.4.1 receivers, and assert byte-identical
destinations via sha256.

Runtime opt-in: `--inc-recursive` CLI flag (no env var or build toggle
required). The flag flips ClientConfig::inc_recursive_send to true,
which causes build_capability_string to include 'i' in the -e string
advertised to the peer.

Skips cleanly when no upstream rsync binary is available, mirroring the
behaviour of the existing live interop fuzzer.

* style(tests): apply rustfmt to inc_recurse_sender_fuzz_1863

* test(interop): remove unused gen_bool helper from fuzz harness
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