Skip to content

Add regression tests for invalid bandwidth limit formats#1832

Merged
oferchen merged 1 commit into
masterfrom
establish-rsync-3.4.1-rust-implementation
Nov 1, 2025
Merged

Add regression tests for invalid bandwidth limit formats#1832
oferchen merged 1 commit into
masterfrom
establish-rsync-3.4.1-rust-implementation

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 1, 2025

Summary

  • add coverage to ensure the bandwidth parser rejects numeric separators that rsync does not accept
  • add a regression test confirming oversized exponents report TooLarge

Testing

  • cargo test -p rsync-bandwidth parse_bandwidth_rejects_numeric_separators -- --nocapture
  • cargo test -p rsync-bandwidth parse_bandwidth_rejects_excessive_exponent -- --nocapture

https://chatgpt.com/codex/tasks/task_e_69055dc0a3dc83239a074928bd5561fa

@oferchen oferchen merged commit 9050a51 into master Nov 1, 2025
@oferchen oferchen deleted the establish-rsync-3.4.1-rust-implementation branch November 1, 2025 01:28
oferchen added a commit that referenced this pull request May 7, 2026
Specifies graduating the io_uring socket writer from IORING_OP_SEND to
IORING_OP_SEND_ZC on kernel >= 6.0: two-CQE completion model,
pin-counted buffer pool for the user-page lifetime contract, kernel
probe via IORING_REGISTER_PROBE with fallback, daemon TCP integration
(#1876), and the throughput vs latency trade-off with the 16 KiB
threshold rule.
oferchen added a commit that referenced this pull request May 17, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 17, 2026
…4301)

Adds `crates/fast_io/src/io_uring/send_zc.rs` exposing
`try_send_zc(ring, fd, buf, user_data)` that submits an
`IORING_OP_SEND_ZC` SQE, drains both the transfer CQE
(`IORING_CQE_F_MORE`) and the notification CQE (`IORING_CQE_F_NOTIF`),
and returns the byte count sent. Kernel support is probed via
`IORING_REGISTER_PROBE` on first call and cached in a process-wide
atomic; unsupported kernels surface `io::ErrorKind::Unsupported` so
callers can fall back transparently.

`IoUringSocketWriter::submit_send` now attempts SEND_ZC first when
`IoUringConfig::allow_send_zc()` is true and the payload is at least
16 KiB (per the workload-B regression guard in
`docs/design/iouring-send-zc.md` section 5), falling back to the
existing `IORING_OP_SEND` batch path on `Unsupported`. A matching
stub module on non-Linux returns `Unsupported` so cross-platform
callers compile without `cfg`-gating.

Unit tests cover the classify-CQE state machine, the empty-buffer
rejection, and a 64 KiB loopback round-trip that succeeds only once
the notification CQE has been observed.
oferchen added a commit that referenced this pull request May 18, 2026
Specifies graduating the io_uring socket writer from IORING_OP_SEND to
IORING_OP_SEND_ZC on kernel >= 6.0: two-CQE completion model,
pin-counted buffer pool for the user-page lifetime contract, kernel
probe via IORING_REGISTER_PROBE with fallback, daemon TCP integration
(#1876), and the throughput vs latency trade-off with the 16 KiB
threshold rule.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
…4301)

Adds `crates/fast_io/src/io_uring/send_zc.rs` exposing
`try_send_zc(ring, fd, buf, user_data)` that submits an
`IORING_OP_SEND_ZC` SQE, drains both the transfer CQE
(`IORING_CQE_F_MORE`) and the notification CQE (`IORING_CQE_F_NOTIF`),
and returns the byte count sent. Kernel support is probed via
`IORING_REGISTER_PROBE` on first call and cached in a process-wide
atomic; unsupported kernels surface `io::ErrorKind::Unsupported` so
callers can fall back transparently.

`IoUringSocketWriter::submit_send` now attempts SEND_ZC first when
`IoUringConfig::allow_send_zc()` is true and the payload is at least
16 KiB (per the workload-B regression guard in
`docs/design/iouring-send-zc.md` section 5), falling back to the
existing `IORING_OP_SEND` batch path on `Unsupported`. A matching
stub module on non-Linux returns `Unsupported` so cross-platform
callers compile without `cfg`-gating.

Unit tests cover the classify-CQE state machine, the empty-buffer
rejection, and a 64 KiB loopback round-trip that succeeds only once
the notification CQE has been observed.
oferchen added a commit that referenced this pull request May 18, 2026
Restructure the SEND_ZC design doc around the explicit 7-section
scope: current send path with file:line citations across daemon,
transfer, and rsync_io; SEND_ZC semantics with the two-CQE
notification model; registered-buffer ownership; kernel-6.0 runtime
probe via IORING_REGISTER_PROBE; loopback + small-file bench plan;
recommendation to defer until the daemon TCP wiring (#1876) lands;
and cross-references to #4217 / #4218 / #4220 / #2243.
oferchen added a commit that referenced this pull request May 18, 2026
…4301)

Adds `crates/fast_io/src/io_uring/send_zc.rs` exposing
`try_send_zc(ring, fd, buf, user_data)` that submits an
`IORING_OP_SEND_ZC` SQE, drains both the transfer CQE
(`IORING_CQE_F_MORE`) and the notification CQE (`IORING_CQE_F_NOTIF`),
and returns the byte count sent. Kernel support is probed via
`IORING_REGISTER_PROBE` on first call and cached in a process-wide
atomic; unsupported kernels surface `io::ErrorKind::Unsupported` so
callers can fall back transparently.

`IoUringSocketWriter::submit_send` now attempts SEND_ZC first when
`IoUringConfig::allow_send_zc()` is true and the payload is at least
16 KiB (per the workload-B regression guard in
`docs/design/iouring-send-zc.md` section 5), falling back to the
existing `IORING_OP_SEND` batch path on `Unsupported`. A matching
stub module on non-Linux returns `Unsupported` so cross-platform
callers compile without `cfg`-gating.

Unit tests cover the classify-CQE state machine, the empty-buffer
rejection, and a 64 KiB loopback round-trip that succeeds only once
the notification CQE has been observed.
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