Skip to content

test(daemon): port daemon-gzip goodbye scenario to nextest (NXT-2) - #6002

Merged
oferchen merged 1 commit into
masterfrom
test/nxt-2-daemon-gzip-goodbye
Jun 19, 2026
Merged

oferchen merged 1 commit into
masterfrom
test/nxt-2-daemon-gzip-goodbye

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds the NXT-1 cross-binary harness primitives (UpstreamVersion, locate_upstream_rsync, require_upstream_rsync, upstream_compat_enabled) to crates/test-support so all NXT-2..NXT-8 ports share one definition.
  • Ports the upstream testsuite/daemon-gzip-download.test goodbye-flush invariant: an upstream rsync 3.4.4 client pulls a ~1 MB -zz fixture from an oc-rsync daemon over TCP and asserts byte-equality + absence of the connection unexpectedly closed UTS-9 signature.
  • The test is sized to clear the ~615 KB cutoff observed in the original UTS-9 capture so the daemon-sender goodbye flush is actually exercised on the wire.

Self-skip semantics

The test no-ops with a clear stderr line under any of three conditions:

  1. OC_RSYNC_UPSTREAM_COMPAT env var is not 1. The standard PR nextest cell does not set this, so the impact on PR wall time is a single early-return.
  2. The upstream rsync 3.4.4 binary cannot be located at target/interop/upstream-install/3.4.4/bin/rsync. Build via tools/ci/run_interop.sh. Override path via OC_RSYNC_UPSTREAM_BIN_3_4_4.
  3. The oc-rsync binary cannot be located via CARGO_BIN_EXE_oc-rsync or by walking up from the test executable.

#[cfg(unix)] gate matches the sibling uts_nextest_daemon_gzip_zz.rs.

CI cell wire-up

NXT-1 specifies a new upstream-compat matrix entry on the existing nextest workflow that runs tools/ci/run_interop.sh to build the upstream binary, sets OC_RSYNC_UPSTREAM_COMPAT=1, and runs the upstream-compat tests filtered by name. That cell does not exist yet — this PR ships only the test + harness primitives so the workflow change can land in a focused follow-up (NXT-1's section 6 design).

The standard PR nextest cell exercises the early-return path on every build and proves the test compiles and self-skips cleanly across Linux / macOS / Windows. Once the upstream-compat cell lands, the test will run as a required check.

References

Test plan

  • cargo fmt --all -- --check clean locally.
  • CI: nextest cells (Linux musl, macOS, Windows) compile the test and self-skip via the env-gate early-return.
  • CI: fmt + clippy green.
  • Once the NXT-1 upstream-compat cell lands, the test executes end-to-end against upstream rsync 3.4.4.

@github-actions github-actions Bot added the test label Jun 19, 2026
Adds the cross-binary upstream-compat harness primitives specified by
NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`,
`upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test`
goodbye-flush invariant into nextest.

The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon
over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the
UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender
goodbye envelope reaches the upstream client without a premature
connection drop - the regression family fixed by PRs #5520 / #5600 /
#5619 / #5725.

Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var
unset (default for PR cells), upstream rsync 3.4.4 binary not present
at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync
binary cannot be located. Wall-time impact on the standard PR cell is
a single early-return.

NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up
step that flips the env var on. That cell does not exist yet; this PR
ships the test and harness only, and a follow-up will add the matrix
entry to the existing nextest workflow.

Refs: docs/design/nxt-1-nextest-harness.md
@oferchen
oferchen force-pushed the test/nxt-2-daemon-gzip-goodbye branch from 47056c5 to d0b487f Compare June 19, 2026 09:50
@oferchen
oferchen merged commit 8198baf into master Jun 19, 2026
4 of 6 checks passed
@oferchen
oferchen deleted the test/nxt-2-daemon-gzip-goodbye branch June 19, 2026 10:26
oferchen added a commit that referenced this pull request Aug 24, 2026
…6002)

Adds the cross-binary upstream-compat harness primitives specified by
NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`,
`upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test`
goodbye-flush invariant into nextest.

The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon
over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the
UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender
goodbye envelope reaches the upstream client without a premature
connection drop - the regression family fixed by PRs #5520 / #5600 /
#5619 / #5725.

Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var
unset (default for PR cells), upstream rsync 3.4.4 binary not present
at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync
binary cannot be located. Wall-time impact on the standard PR cell is
a single early-return.

NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up
step that flips the env var on. That cell does not exist yet; this PR
ships the test and harness only, and a follow-up will add the matrix
entry to the existing nextest workflow.

Refs: docs/design/nxt-1-nextest-harness.md
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