Skip to content

Align xtask test command with CI targets#2217

Merged
oferchen merged 1 commit into
masterfrom
implement-rsync-3.4.1-behavioral-parity
Nov 23, 2025
Merged

Align xtask test command with CI targets#2217
oferchen merged 1 commit into
masterfrom
implement-rsync-3.4.1-behavioral-parity

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • update the xtask test runner to invoke cargo nextest with --all-targets so it mirrors CI coverage

Testing

  • cargo test -p xtask

Codex Task

@oferchen oferchen merged commit abcb1f4 into master Nov 23, 2025
5 of 6 checks passed
@oferchen oferchen deleted the implement-rsync-3.4.1-behavioral-parity branch November 23, 2025 11:48
oferchen added a commit that referenced this pull request May 15, 2026
…y) (#4095)

Adds the upstream rsync 3.4.2 --compress-threads / --zt long option to
oc-rsync. The flag accepts integers 0..=64; 0 (the default) lets zstd
choose its own worker count. Negative values, non-numeric input, and
out-of-range positive integers are rejected with a user-facing error.

The value is plumbed through ParsedArgs -> drive options ->
ClientConfigBuilder -> ClientConfig but is not yet forwarded to the
zstd codec. The zstd ZSTD_c_nbWorkers wiring will land in a follow-up.

Upstream reference (rsync-3.4.2/options.c):

  89:  int do_compression_threads = 0; /*n = 0 use rsync thread, n >= 1 spawn n threads for compression */
  760: {"compress-threads", 0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  761: {"zt",               0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  2016-2017: if (do_compression_threads < 0) do_compression_threads = 0;

Refs #2238, parent #2217.
oferchen added a commit that referenced this pull request May 15, 2026
….2 parity) (#4100)

* feat: wire --compress-threads=N through to zstd ZSTD_c_nbWorkers

Plumb the value parsed in #4095 into the actual zstd encoder via
`ZSTD_c_nbWorkers`, matching upstream `token.c:701` so a non-zero
`--compress-threads=N` engages real worker threads instead of being
silently dropped.

- `compress::zstd::CountingZstdEncoder` gains `new_with_workers` /
  `with_sink_workers` constructors and a `SUPPORTS_MULTITHREAD` const.
- `engine::ActiveCompressor::new_with_workers` and
  `transfer::CompressedWriter::with_workers` thread the value end to
  end. `LocalCopyOptions` gains `compression_threads` and is populated
  from `ClientConfig::compression_threads` in `apply_compression`.
- Multithreaded zstd lives behind a `zstdmt` Cargo feature on the
  `compress` crate (off by default to avoid a forced C build cost).
  Requesting workers without the feature returns `Unsupported` so
  callers can fall back to single-threaded compression instead of
  silently discarding the user's request.

upstream: options.c:89 do_compression_threads, token.c:701.

Refs #2239, #2217.

* style: apply rustfmt to zstd worker wiring

* fix(compress): avoid Result::unwrap_err since encoder lacks Debug

* fix(engine): wire compression_threads through options builder + Debug-safe unwrap

* fix(engine): gate unused ActiveCompressor::new behind #[cfg(test)]

* fix(transfer): avoid expect_err on CompressedWriter lacking Debug
oferchen added a commit that referenced this pull request May 18, 2026
…y) (#4095)

Adds the upstream rsync 3.4.2 --compress-threads / --zt long option to
oc-rsync. The flag accepts integers 0..=64; 0 (the default) lets zstd
choose its own worker count. Negative values, non-numeric input, and
out-of-range positive integers are rejected with a user-facing error.

The value is plumbed through ParsedArgs -> drive options ->
ClientConfigBuilder -> ClientConfig but is not yet forwarded to the
zstd codec. The zstd ZSTD_c_nbWorkers wiring will land in a follow-up.

Upstream reference (rsync-3.4.2/options.c):

  89:  int do_compression_threads = 0; /*n = 0 use rsync thread, n >= 1 spawn n threads for compression */
  760: {"compress-threads", 0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  761: {"zt",               0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  2016-2017: if (do_compression_threads < 0) do_compression_threads = 0;

Refs #2238, parent #2217.
oferchen added a commit that referenced this pull request May 18, 2026
….2 parity) (#4100)

* feat: wire --compress-threads=N through to zstd ZSTD_c_nbWorkers

Plumb the value parsed in #4095 into the actual zstd encoder via
`ZSTD_c_nbWorkers`, matching upstream `token.c:701` so a non-zero
`--compress-threads=N` engages real worker threads instead of being
silently dropped.

- `compress::zstd::CountingZstdEncoder` gains `new_with_workers` /
  `with_sink_workers` constructors and a `SUPPORTS_MULTITHREAD` const.
- `engine::ActiveCompressor::new_with_workers` and
  `transfer::CompressedWriter::with_workers` thread the value end to
  end. `LocalCopyOptions` gains `compression_threads` and is populated
  from `ClientConfig::compression_threads` in `apply_compression`.
- Multithreaded zstd lives behind a `zstdmt` Cargo feature on the
  `compress` crate (off by default to avoid a forced C build cost).
  Requesting workers without the feature returns `Unsupported` so
  callers can fall back to single-threaded compression instead of
  silently discarding the user's request.

upstream: options.c:89 do_compression_threads, token.c:701.

Refs #2239, #2217.

* style: apply rustfmt to zstd worker wiring

* fix(compress): avoid Result::unwrap_err since encoder lacks Debug

* fix(engine): wire compression_threads through options builder + Debug-safe unwrap

* fix(engine): gate unused ActiveCompressor::new behind #[cfg(test)]

* fix(transfer): avoid expect_err on CompressedWriter lacking Debug
oferchen added a commit that referenced this pull request May 18, 2026
…y) (#4095)

Adds the upstream rsync 3.4.2 --compress-threads / --zt long option to
oc-rsync. The flag accepts integers 0..=64; 0 (the default) lets zstd
choose its own worker count. Negative values, non-numeric input, and
out-of-range positive integers are rejected with a user-facing error.

The value is plumbed through ParsedArgs -> drive options ->
ClientConfigBuilder -> ClientConfig but is not yet forwarded to the
zstd codec. The zstd ZSTD_c_nbWorkers wiring will land in a follow-up.

Upstream reference (rsync-3.4.2/options.c):

  89:  int do_compression_threads = 0; /*n = 0 use rsync thread, n >= 1 spawn n threads for compression */
  760: {"compress-threads", 0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  761: {"zt",               0,  POPT_ARG_INT, &do_compression_threads, 0, 0, 0 },
  2016-2017: if (do_compression_threads < 0) do_compression_threads = 0;

Refs #2238, parent #2217.
oferchen added a commit that referenced this pull request May 18, 2026
….2 parity) (#4100)

* feat: wire --compress-threads=N through to zstd ZSTD_c_nbWorkers

Plumb the value parsed in #4095 into the actual zstd encoder via
`ZSTD_c_nbWorkers`, matching upstream `token.c:701` so a non-zero
`--compress-threads=N` engages real worker threads instead of being
silently dropped.

- `compress::zstd::CountingZstdEncoder` gains `new_with_workers` /
  `with_sink_workers` constructors and a `SUPPORTS_MULTITHREAD` const.
- `engine::ActiveCompressor::new_with_workers` and
  `transfer::CompressedWriter::with_workers` thread the value end to
  end. `LocalCopyOptions` gains `compression_threads` and is populated
  from `ClientConfig::compression_threads` in `apply_compression`.
- Multithreaded zstd lives behind a `zstdmt` Cargo feature on the
  `compress` crate (off by default to avoid a forced C build cost).
  Requesting workers without the feature returns `Unsupported` so
  callers can fall back to single-threaded compression instead of
  silently discarding the user's request.

upstream: options.c:89 do_compression_threads, token.c:701.

Refs #2239, #2217.

* style: apply rustfmt to zstd worker wiring

* fix(compress): avoid Result::unwrap_err since encoder lacks Debug

* fix(engine): wire compression_threads through options builder + Debug-safe unwrap

* fix(engine): gate unused ActiveCompressor::new behind #[cfg(test)]

* fix(transfer): avoid expect_err on CompressedWriter lacking Debug
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