Skip to content

I/O chaos testing #127

@EdmondDantes

Description

@EdmondDantes

Follow-up to #125 (section 4 — roadmap layers). The chaos suite now covers scheduler-interleaving and 100% of the API surface, but I/O edge cases remain untested: partial reads, EAGAIN storms, mid-stream RST, backpressure, slow FIN, malformed/garbage payloads, a peer that accepts then never reads.

Approach

In-process EvilPeer rather than Toxiproxy — to avoid adding an external dev/CI dependency. A small PHP peer under fuzzy-tests/io_chaos/ driven by a seeded fault table. Toxiproxy may be layered on later as an optional extra.

Scope

  • new fuzzy-tests/io_chaos/ directory + harness (separate from the scenario harness)
  • fault toxics:
    • latency (with jitter)
    • slicer — chop the TCP stream into random small chunks (exposes partial-read bugs)
    • reset_peerRST after N ms / N bytes
    • bandwidth / limit_data — backpressure scenarios
    • slow_close — delayed FIN
    • timeout — stall after N bytes
    • malformed / garbage payloads
  • target topics: stream, socket, curl
  • invariants for every interleaving: no lost wakeups, no double uv_close, partial reads reassembled correctly, cancellation-during-read cleans up handles, no refcount leaks

Reference

FUZZ_TESTING.md — Layer 2 (I/O chaos) describes the full strategy, including the Toxiproxy toxics list and the EvilPeer fallback rationale.

Related: #125 (sections 1–3 done), #102 (original fuzzing infrastructure).

Metadata

Metadata

Assignees

Labels

testsTest coverage task

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions