added testing of old static binaries#937
Open
tridge wants to merge 4 commits into
Open
Conversation
Let the suite run with two rsync binaries so the current build can be
tested against the actual old code of a previous release, rather than
only forcing the current binary to speak an old protocol (check29/30).
--rsync-bin2 PATH exports RSYNC_PEER, the binary used for the SERVER
side of two-sided transfers (the daemon process and
the remote-shell --rsync-path target). Defaults to
RSYNC, so single-binary runs are byte-for-byte
unchanged.
--expect-result F the manifest's listed tests ARE the run set; each
test's actual outcome (pass/skip/fail/xfail) is
compared to its expected one and any mismatch --
including an unexpected pass (xpass) -- fails the
run. --expect-skipped and the default exit logic
are untouched.
rsyncfns gains the RSYNC_PEER global and launches the daemon with it
(start_rsyncd / start_test_daemon, the latter with an optional rsync_cmd
override used by the reverse-direction test); the remote-shell tests
pass --rsync-path={RSYNC_PEER}. All no-ops when no peer is selected.
Direction is fixed: the current binary always drives (only it
understands the new test scripts); the old binary is only ever the
server/daemon side.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Every other two-sided test drives with the current binary, covering new-client -> old-server. This adds the backward-compat direction that matters most for a project shipping new servers to a world of old clients: a current daemon must keep serving the installed base of old rsync clients. reverse-daemon-delta_test.py starts the daemon with the current build (via start_test_daemon's rsync_cmd override) and drives it with the old binary. It does a push and a pull, each with and without -z, with the receiving side pre-seeded with an older version of the file so the delta algorithm actually runs -- exercising delta encoding both ways (old->new on push, new->old on pull) and compression negotiation both ways. It asserts the bytes crossing the wire are far smaller than the file, so a silent fallback to a whole-file copy is caught, and accepts both the modern "sent/received" and the old "wrote/read" summary wording so an old client's output parses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Nine statically-linked, stripped binaries for the version-mixing test suite (and ad-hoc cross-version behaviour checks): every x.y.0 release from 2.6.0 (2004, protocol 27) through 3.4.0, plus the 3.1.3/3.2.7/3.4.1 point releases. 2.6.0 is the practical floor; older tags need more porting to build on a current toolchain. build_static.sh rebuilds any release from its git tag, applying the minimal patches needed to compile old sources on a modern toolchain: K&R lseek64 redecl, gettimeofday, -std=gnu11, --disable-openssl, and _FORTIFY_SOURCE disabled (modern FORTIFY=3 turns latent benign over-reads in old rsync into aborts when it runs as a server). Pre-3.0 trees ship configure.in, so it regenerates configure (autoheader/autoconf) after neutralizing the dead AC_LIBOBJ replacement fallbacks, generates proto.h, and stubs the dropped vendored lib/addrinfo.h -- all guarded to no-op on newer versions. .gitattributes marks the binaries binary (so the text=auto rule can't corrupt them) and export-ignore (kept out of the release tarball). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d10dc29 to
4d4590d
Compare
Adds .github/workflows/ubuntu-version-mix.yml (ubuntu-latest) and a per-release manifest testsuite/expect/rsync_<ver>.expect for each of the nine peers. The workflow builds the current rsync, then runs the two- sided suite against every old binary over both the pipe and --use-tcp daemon transports. All peers run in a SINGLE looped job (not a matrix) so the PR shows one check line; each peer/transport is a foldable log group and a failure annotates which one broke. A new phony `check-progs` target builds rsync plus the test helper programs and check symlinks without running the suite -- the build half of `make check` -- so the workflow's direct runtests.py invocation has the helpers it needs. Notable expected results encoded in the manifests: - The four May-2026 security tests xfail against every released peer: the suite demonstrates each release is vulnerable to those findings while current master is fixed. - symlink-dirlink-basis xfails on 3.4.0/3.4.1 (issue RsyncProject#715: their secure_relative_open O_NOFOLLOW-confines the basedir, breaking a -K dir-symlink update; current master fixes it with secure_basis_open). - Older peers carry more xfails for options/negotiation they lack; 2.6.0 (protocol 27) fails most daemon tests. reverse-daemon-delta passes against all peers, confirming backward compat down to 2004. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4d4590d to
ec7172d
Compare
@tridge , i think that depends, at least i managed to build down to 1.6.5 without too much porting efforts on alpine. at least i got working binaries. so if you want to even go down further , here is build instructions for it . unfortunately mail formatting got a little bit broken. can resend a better version if you like. https://www.mail-archive.com/rsync@lists.samba.org/msg33961.html |
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.
This adds direct testing of old versions of rsync. The existing test suite did backwards compatibility testing by forcing old protocol versions, which is a useful test, but not as complete as actually running old versions.
Adds versions dating back to 2.6, released in 2004