Skip to content

test(fast_io): io_uring fallback under unprivileged container (#1624) - #4240

Merged
oferchen merged 2 commits into
masterfrom
test/iouring-unprivileged-container-1624
May 17, 2026
Merged

oferchen merged 2 commits into
masterfrom
test/iouring-unprivileged-container-1624

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add tools/ci/test_iouring_unprivileged.sh to drive a real unprivileged
    podman/docker container through two scenarios: a default unprivileged
    container, and the same container plus a nested user namespace that reliably
    blocks io_uring_setup(2). Both must produce a correct local-to-local
    transfer that matches the source tree byte for byte.
  • Add tests/iouring_unprivileged_fallback.rs, a workspace-root integration
    test that shells out to the script when OC_RSYNC_IOURING_CONTAINER_TEST=1
    is set. Default behaviour is a clean skip so nextest stays green on hosts
    without a container runtime.
  • Complements the in-process unit coverage in
    crates/fast_io/tests/io_uring_probe_fallback.rs (mocked probes) by
    verifying the same behaviour through an actual container boundary.

Test plan

  • CI: fmt + clippy + nextest (stable) pass on Linux, macOS, Windows, musl
  • Locally with podman: OC_RSYNC_IOURING_CONTAINER_TEST=1 cargo nextest run -E 'test(iouring_unprivileged_container_fallback)'
  • Locally without a container runtime: same command emits a single skip line and exits zero
  • bash tools/ci/test_iouring_unprivileged.sh against a built target/debug/oc-rsync reports both scenarios as OK

Add a real-container test that exercises oc-rsync's io_uring detection and
fallback path on hosts where the syscall is restricted by seccomp, capability
loss, or kernel sysctl. The new script tools/ci/test_iouring_unprivileged.sh
runs two scenarios: a default unprivileged container, and the same container
with an additional nested user namespace that reliably blocks io_uring_setup.
Both must produce a correct local-to-local transfer.

A workspace-root integration test, tests/iouring_unprivileged_fallback.rs,
shells out to the script when OC_RSYNC_IOURING_CONTAINER_TEST=1 is set, and
skips cleanly otherwise so it stays nextest-friendly.
@github-actions github-actions Bot added the test label May 17, 2026
@oferchen
oferchen merged commit 3fe76ef into master May 17, 2026
17 checks passed
oferchen added a commit that referenced this pull request May 18, 2026
…#4240)

* test(fast_io): io_uring fallback under unprivileged container (#1624)

Add a real-container test that exercises oc-rsync's io_uring detection and
fallback path on hosts where the syscall is restricted by seccomp, capability
loss, or kernel sysctl. The new script tools/ci/test_iouring_unprivileged.sh
runs two scenarios: a default unprivileged container, and the same container
with an additional nested user namespace that reliably blocks io_uring_setup.
Both must produce a correct local-to-local transfer.

A workspace-root integration test, tests/iouring_unprivileged_fallback.rs,
shells out to the script when OC_RSYNC_IOURING_CONTAINER_TEST=1 is set, and
skips cleanly otherwise so it stays nextest-friendly.

* style: cargo fmt
oferchen added a commit that referenced this pull request May 18, 2026
…#4240)

* test(fast_io): io_uring fallback under unprivileged container (#1624)

Add a real-container test that exercises oc-rsync's io_uring detection and
fallback path on hosts where the syscall is restricted by seccomp, capability
loss, or kernel sysctl. The new script tools/ci/test_iouring_unprivileged.sh
runs two scenarios: a default unprivileged container, and the same container
with an additional nested user namespace that reliably blocks io_uring_setup.
Both must produce a correct local-to-local transfer.

A workspace-root integration test, tests/iouring_unprivileged_fallback.rs,
shells out to the script when OC_RSYNC_IOURING_CONTAINER_TEST=1 is set, and
skips cleanly otherwise so it stays nextest-friendly.

* style: cargo fmt
@oferchen
oferchen deleted the test/iouring-unprivileged-container-1624 branch May 19, 2026 19:27
oferchen added a commit that referenced this pull request Aug 24, 2026
…#4240)

* test(fast_io): io_uring fallback under unprivileged container (#1624)

Add a real-container test that exercises oc-rsync's io_uring detection and
fallback path on hosts where the syscall is restricted by seccomp, capability
loss, or kernel sysctl. The new script tools/ci/test_iouring_unprivileged.sh
runs two scenarios: a default unprivileged container, and the same container
with an additional nested user namespace that reliably blocks io_uring_setup.
Both must produce a correct local-to-local transfer.

A workspace-root integration test, tests/iouring_unprivileged_fallback.rs,
shells out to the script when OC_RSYNC_IOURING_CONTAINER_TEST=1 is set, and
skips cleanly otherwise so it stays nextest-friendly.

* style: cargo fmt
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