Skip to content

feat: add compression codec interop test infrastructure - #3031

Merged
oferchen merged 5 commits into
masterfrom
feature/zstd-lz4-interop
Mar 28, 2026
Merged

oferchen merged 5 commits into
masterfrom
feature/zstd-lz4-interop

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add tests/compress_interop_test.sh - comprehensive daemon-mode interop tests for zstd, lz4, and zlibx compression codecs in both directions (oc-rsync client to upstream daemon and upstream client to oc-rsync daemon)
  • Enable zstd and lz4 in supported_compressions() auto-negotiation, feature-gated on cfg(feature = "zstd") and cfg(feature = "lz4") respectively
  • Preference order matches upstream rsync 3.4.1: zstd > lz4 > zlibx > zlib > none
  • Add libzstd-dev and liblz4-dev to CI APT packages and remove --disable-lz4 from upstream rsync build so interop tests exercise the real codecs
  • Add validate-compress job to interop-validation.yml and compress-zstd/compress-lz4 scenarios to run_interop.sh
  • Update negotiation tests with feature-gated assertions

Test plan

  • validate-compress CI job passes (zstd, lz4, zlibx in both directions)
  • Existing interop CI job passes with new compress-zstd/compress-lz4 scenarios
  • fmt+clippy passes
  • nextest passes on all platforms (negotiation test changes)
  • Windows/macOS builds pass (feature-gated cfg guards compile cleanly)

@github-actions github-actions Bot added the enhancement New feature or request label Mar 28, 2026
@oferchen oferchen changed the title feat: enable zstd/lz4 in compression auto-negotiation feat: add compression codec interop test infrastructure Mar 28, 2026
@oferchen
oferchen force-pushed the feature/zstd-lz4-interop branch from 6bc059f to 4059fdf Compare March 28, 2026 13:48
Add tests/compress_interop_test.sh covering bidirectional daemon-mode
transfers with zstd, lz4, and zlibx codecs. Both directions tested:
oc-rsync client to upstream daemon and upstream client to oc-rsync daemon.

CI changes:
- Add libzstd-dev and liblz4-dev to APT packages in all interop workflows
- Remove --disable-lz4 from upstream rsync build so lz4/zstd are linked
- Add validate-compress job to interop-validation.yml
- Add compress-zstd and compress-lz4 scenarios to run_interop.sh
Advertise zstd and lz4 during protocol negotiation when compiled with
the corresponding feature flags. Preference order matches upstream rsync
3.4.1: zstd > lz4 > zlibx > zlib > none. Wire-level interop is now
validated by the compress interop test suite.

Update negotiation tests to reflect the new behavior: zstd is selected
when both sides support it, with feature-gated assertions for builds
without zstd/lz4.
Interop testing revealed two issues:
1. Upstream rsync uses --compress-choice=ALGO, not --compress=ALGO
2. Zstd wire format shows "Unknown frame descriptor" errors - our
   per-token zstd framing doesn't match upstream token.c yet

Revert zstd/lz4 from supported_compressions() - only advertise
zlibx/zlib/none until wire format is fixed. Mark zstd/lz4 interop
tests as informational/skipped. Zlibx and auto-negotiation tests
exercise the validated code paths.
The compress-zstd and compress-lz4 scenarios used --compress=zstd which
is not a valid flag for either upstream rsync or oc-rsync (both use
--compress-choice=ALGO). Remove these scenarios until wire format
interop is validated. Compression-specific testing is handled by
tests/compress_interop_test.sh.
@oferchen
oferchen force-pushed the feature/zstd-lz4-interop branch from 716c4f5 to 8af4b78 Compare March 28, 2026 15:34
@oferchen
oferchen merged commit 21d7605 into master Mar 28, 2026
19 checks passed
@oferchen
oferchen deleted the feature/zstd-lz4-interop branch March 28, 2026 15:34
oferchen added a commit that referenced this pull request May 1, 2026
* test: add zstd/lz4 compression interop test and CI infrastructure

Add tests/compress_interop_test.sh covering bidirectional daemon-mode
transfers with zstd, lz4, and zlibx codecs. Both directions tested:
oc-rsync client to upstream daemon and upstream client to oc-rsync daemon.

CI changes:
- Add libzstd-dev and liblz4-dev to APT packages in all interop workflows
- Remove --disable-lz4 from upstream rsync build so lz4/zstd are linked
- Add validate-compress job to interop-validation.yml
- Add compress-zstd and compress-lz4 scenarios to run_interop.sh

* feat: enable zstd/lz4 in compression auto-negotiation

Advertise zstd and lz4 during protocol negotiation when compiled with
the corresponding feature flags. Preference order matches upstream rsync
3.4.1: zstd > lz4 > zlibx > zlib > none. Wire-level interop is now
validated by the compress interop test suite.

Update negotiation tests to reflect the new behavior: zstd is selected
when both sides support it, with feature-gated assertions for builds
without zstd/lz4.

* style: fix rustfmt assert! line length in negotiation tests

* fix: revert zstd/lz4 from auto-negotiation, fix interop test script

Interop testing revealed two issues:
1. Upstream rsync uses --compress-choice=ALGO, not --compress=ALGO
2. Zstd wire format shows "Unknown frame descriptor" errors - our
   per-token zstd framing doesn't match upstream token.c yet

Revert zstd/lz4 from supported_compressions() - only advertise
zlibx/zlib/none until wire format is fixed. Mark zstd/lz4 interop
tests as informational/skipped. Zlibx and auto-negotiation tests
exercise the validated code paths.

* fix: remove zstd/lz4 scenarios from interop harness

The compress-zstd and compress-lz4 scenarios used --compress=zstd which
is not a valid flag for either upstream rsync or oc-rsync (both use
--compress-choice=ALGO). Remove these scenarios until wire format
interop is validated. Compression-specific testing is handled by
tests/compress_interop_test.sh.
oferchen added a commit that referenced this pull request May 5, 2026
* test: add zstd/lz4 compression interop test and CI infrastructure

Add tests/compress_interop_test.sh covering bidirectional daemon-mode
transfers with zstd, lz4, and zlibx codecs. Both directions tested:
oc-rsync client to upstream daemon and upstream client to oc-rsync daemon.

CI changes:
- Add libzstd-dev and liblz4-dev to APT packages in all interop workflows
- Remove --disable-lz4 from upstream rsync build so lz4/zstd are linked
- Add validate-compress job to interop-validation.yml
- Add compress-zstd and compress-lz4 scenarios to run_interop.sh

* feat: enable zstd/lz4 in compression auto-negotiation

Advertise zstd and lz4 during protocol negotiation when compiled with
the corresponding feature flags. Preference order matches upstream rsync
3.4.1: zstd > lz4 > zlibx > zlib > none. Wire-level interop is now
validated by the compress interop test suite.

Update negotiation tests to reflect the new behavior: zstd is selected
when both sides support it, with feature-gated assertions for builds
without zstd/lz4.

* style: fix rustfmt assert! line length in negotiation tests

* fix: revert zstd/lz4 from auto-negotiation, fix interop test script

Interop testing revealed two issues:
1. Upstream rsync uses --compress-choice=ALGO, not --compress=ALGO
2. Zstd wire format shows "Unknown frame descriptor" errors - our
   per-token zstd framing doesn't match upstream token.c yet

Revert zstd/lz4 from supported_compressions() - only advertise
zlibx/zlib/none until wire format is fixed. Mark zstd/lz4 interop
tests as informational/skipped. Zlibx and auto-negotiation tests
exercise the validated code paths.

* fix: remove zstd/lz4 scenarios from interop harness

The compress-zstd and compress-lz4 scenarios used --compress=zstd which
is not a valid flag for either upstream rsync or oc-rsync (both use
--compress-choice=ALGO). Remove these scenarios until wire format
interop is validated. Compression-specific testing is handled by
tests/compress_interop_test.sh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant