# Testing signals — tokio-rs/tokio

> Canonical page: https://codevetter.com/unpack/tokio/testing-signals

# Testing signals — tokio-rs/tokio

Scanned commit 2746c3ae26f8ac0af6023843a7f23d419c334efe (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Tests and CI were inspected, not executed; no passing result is asserted. The inspected suites use Rust tests, tokio::test, trybuild, deterministic I/O mocks, and Loom concurrency modeling. CI defines nextest, separate doctests, Miri, stress testing, platform checks, and Linux-kernel-specific execution. Coverage observations are bounded: feature guards, target exclusions, and model limits prevent treating these definitions as exhaustive verification.
- tcp_echo uses tokio::test and real loopback sockets to verify repeated client round trips, split-stream copying, total byte count, and oneshot completion; Miri uses fewer iterations. — [tokio/tests/tcp_echo.rs#L16-L51](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/tests/tcp_echo.rs#L16-L51)
- fs_file verifies reads, flushed writes, shutdown writes, and conversion to standard files; its suite is feature-gated and excludes WASI. — [tokio/tests/fs_file.rs#L2-L14](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/tests/fs_file.rs#L2-L14) [tokio/tests/fs_file.rs#L26-L63](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/tests/fs_file.rs#L26-L63) [tokio/tests/fs_file.rs#L156-L179](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/tests/fs_file.rs#L156-L179)
- length_delimited tests use scripted framed I/O to check incomplete headers/payloads and oversized frames; separate cases verify encoding buffer growth and length-field limits. — [tokio-util/tests/length_delimited.rs#L255-L312](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio-util/tests/length_delimited.rs#L255-L312) [tokio-util/tests/length_delimited.rs#L720-L741](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio-util/tests/length_delimited.rs#L720-L741)
- tests-build uses trybuild pass and compile_fail fixtures for macro argument forwarding, invalid inputs, joins, and type mismatches; the harness is ignored under Miri. — [tests-build/tests/macros.rs#L1-L37](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tests-build/tests/macros.rs#L1-L37)
- Loom models scheduler shutdown races involving block_in_place; CI bounds exploration with two preemptions and 10,000 branches and conditionally selects suites by PR labels. — [tokio/src/runtime/tests/loom_multi_thread.rs#L80-L99](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/src/runtime/tests/loom_multi_thread.rs#L80-L99) [.github/workflows/loom.yml#L14-L17](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/loom.yml#L14-L17) [.github/workflows/loom.yml#L99-L122](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/loom.yml#L99-L122)
- Workspace CI runs nextest on three operating systems, repeats companion tests after removing local patches, and runs doctests separately; feature-powerset checks are limited to depth two. — [.github/workflows/ci.yml#L94-L133](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/ci.yml#L94-L133) [.github/workflows/ci.yml#L736-L766](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/ci.yml#L736-L766)
- CI defines Miri with strict provenance and disabled isolation; stress-test defines release compilation and Valgrind leak checking for simple_echo_tcp. — [.github/workflows/ci.yml#L411-L455](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/ci.yml#L411-L455) [.github/workflows/stress-test.yml#L22-L45](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/stress-test.yml#L22-L45)
- io-uring tests are Linux/unstable/feature-gated; CI builds filesystem and library tests for QEMU kernels, including 4.19.325, and requires a completion marker beyond failure-summary checks. — [tokio/tests/fs_uring.rs#L3-L9](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/tokio/tests/fs_uring.rs#L3-L9) [.github/workflows/ci.yml#L1394-L1406](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/ci.yml#L1394-L1406) [.github/workflows/uring-kernel-version-test.yml#L43-L51](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/uring-kernel-version-test.yml#L43-L51) [.github/workflows/uring-kernel-version-test.yml#L119-L129](https://github.com/tokio-rs/tokio/blob/2746c3ae26f8ac0af6023843a7f23d419c334efe/.github/workflows/uring-kernel-version-test.yml#L119-L129)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
