Repository navigation
test(filters): differential fuzzer vs upstream rsync 3.4.2 (#1291) - #4184
Merged
Merged
Conversation
oferchen
force-pushed
the
test/filter-differential-fuzzer-1291
branch
from
May 16, 2026 20:44
b7e4418 to
d7bebf8
Compare
oferchen
force-pushed
the
test/filter-differential-fuzzer-1291
branch
3 times, most recently
from
May 16, 2026 22:38
e782817 to
5bd4053
Compare
Adds a cargo-fuzz target that builds a FilterSet from a randomised rule chain, evaluates a candidate path against it, and compares the verdict to the same rules and path given to a real upstream rsync binary in --dry-run --recursive --verbose mode. Divergences and panics both fail the input. The harness is throughput-limited (200-500 exec/sec) because each input spawns a child rsync process - documented inline. A companion script, tools/ci/run_filter_fuzz.sh, wraps the target with binary discovery and a configurable duration (default 60s smoke run, intended for hours-long local soaks).
oferchen
force-pushed
the
test/filter-differential-fuzzer-1291
branch
from
May 16, 2026 23:19
5bd4053 to
30e0b6d
Compare
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4184) Adds a cargo-fuzz target that builds a FilterSet from a randomised rule chain, evaluates a candidate path against it, and compares the verdict to the same rules and path given to a real upstream rsync binary in --dry-run --recursive --verbose mode. Divergences and panics both fail the input. The harness is throughput-limited (200-500 exec/sec) because each input spawns a child rsync process - documented inline. A companion script, tools/ci/run_filter_fuzz.sh, wraps the target with binary discovery and a configurable duration (default 60s smoke run, intended for hours-long local soaks).
oferchen
added a commit
that referenced
this pull request
May 18, 2026
…4184) Adds a cargo-fuzz target that builds a FilterSet from a randomised rule chain, evaluates a candidate path against it, and compares the verdict to the same rules and path given to a real upstream rsync binary in --dry-run --recursive --verbose mode. Divergences and panics both fail the input. The harness is throughput-limited (200-500 exec/sec) because each input spawns a child rsync process - documented inline. A companion script, tools/ci/run_filter_fuzz.sh, wraps the target with binary discovery and a configurable duration (default 60s smoke run, intended for hours-long local soaks).
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…4184) Adds a cargo-fuzz target that builds a FilterSet from a randomised rule chain, evaluates a candidate path against it, and compares the verdict to the same rules and path given to a real upstream rsync binary in --dry-run --recursive --verbose mode. Divergences and panics both fail the input. The harness is throughput-limited (200-500 exec/sec) because each input spawns a child rsync process - documented inline. A companion script, tools/ci/run_filter_fuzz.sh, wraps the target with binary discovery and a configurable duration (default 60s smoke run, intended for hours-long local soaks).
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
cargo-fuzztargetfilter_differentialthat drives both the oc-rsync filter engine (filters::FilterSet) and a real upstreamrsync3.4.2 binary with the same randomised rule chain and candidate path, asserting that both reach the same include/exclude verdict.tools/ci/run_filter_fuzz.shfor a wrapped invocation with upstream binary discovery ($OC_RSYNC_UPSTREAM_BIN, then the standardtarget/interop/upstream-install/<v>/bin/rsyncpaths, then system locations) and a configurable duration (FUZZ_SECONDS, default 60).fuzz/README.mdto document the new target and its throughput characteristics.Why differential?
Reading the rsync man page is not enough.
exclude.chas many quirks around anchored vs unanchored patterns, directory-only rules, perishable flags, and modifier interactions that are only visible when both engines see the exact same byte sequence. This target catches the gap between "we agree with upstream's text" and "we agree with upstream's behaviour".Throughput
Each input spawns a child
rsyncprocess. Expect ~200-500 exec/sec on a modern laptop, two orders of magnitude slower than the in-process fuzz targets in this workspace. Documented inline in the target. Pair withprotocol_wireandsimd_checksum_parityfor raw coverage.CI
Per the task brief, only sanity-level CI integration was in scope; the standalone fuzz workspace remains excluded from the root workspace so
cargo buildon stable is unaffected. A scheduled 24h soak is tracked separately under #1293.Test plan
bash tools/ci/run_filter_fuzz.shexits cleanly after the default 60s with no crashes/divergences on a machine that has either a built upstream binary undertarget/interop/upstream-install/or a systemrsync 3.4.2.OC_RSYNC_UPSTREAM_BIN=/path/to/rsync FUZZ_SECONDS=600 bash tools/ci/run_filter_fuzz.shproduces no findings underfuzz/artifacts/filter_differential/.