Repository navigation
Description
Follow-up to #39. The Windows/macOS CI slice shipped in #40 (merged); this issue tracks the two remaining slices.
1. External conformance test suites
Wire into a separate nightly workflow (does not gate PRs):
- h2spec (summerwind/h2spec) — RFC 7540 + RFC 7541, ~150 cases. Run against a worker on
:8443(TLS) and:8080(h2c). JSON artifact. - testssl.sh — TLS cipher suites, ROBOT/DROWN/Heartbleed/Logjam. JSON artifact.
- tlsfuzzer — TLS 1.0–1.3 RFC conformance + fuzz, vector scripts (ROBOT/padding/HRR).
- h2load — already used by hand; pin a minimal smoke in CI (RPS regression alarm — trend only, not a hard gate).
Bring the server up via a minimal HttpArena/entry.php profile, the same way tests/e2e/ does.
2. Chaos / fuzz harness
Fully modeled on php-src/ext/async/fuzzy-tests/. We already have tests/fuzz/ (libFuzzer-style), but that's different — the chaos harness sits above the protocol, not at the parser.
Architecture (from ext/async/fuzzy-tests/README.md)
- Gherkin
.feature→ generator →_generated/<topic>/*.phpt - Two fuzz-seed axes:
CHAOS_GEN_SEED(value fuzz) andTRUE_ASYNC_SCHED=random:N(scheduler fuzz) - Mutation blocks:
One of:/Any of:for scenario combinations - Freeze: a caught fail → moved into
_frozen/with both seeds pinned, committed as a regression - Chaos event log: on fail print a reproducible record (toxic params + I/O trace)
Topics (HTTP-server-specific)
| Topic | What we fuzz |
|---|---|
h1_pipeline |
pipeline of N requests, random sizes / keep-alive / mid-stream Connection: close |
h2_framing |
random ordering of HEADERS/DATA/CONTINUATION/RST/SETTINGS |
h2_rapid_reset |
CVE-2023-44487 — open-then-RST stream, vary cadence |
h2_continuation_flood |
CVE-2024-27316 |
hpack |
dynamic-table edge cases, never-indexed, huffman |
tls_handshake |
abort mid-ClientHello/EE/Finished, renegotiation |
streaming_body |
large bodies, slow chunks, mid-stream EOF |
static_cache |
concurrent GET on a single entry, eviction, OOM |
concurrency |
worker × pool sizing × coroutine cancel (our domain) |
Transport chaos (third axis)
From nightly-io-chaos.yml — Toxiproxy (Shopify) as the external transport-fault injector: bandwidth throttling, latency+jitter, TCP segment slicing, byte-counted truncation, abrupt mid-stream close. Opt-in nightly job on :8474; a --SKIPIF-- probe skips wherever Toxiproxy isn't answering.
EvilPeer (no external deps)
Pure-PHP misbehaving peer (_peers/EvilPeer.php from ext/async) — toxics driven by a declarative table, seeded by CHAOS_GEN_SEED. Covers the same surface as Toxiproxy, no binary needed — runs in PR CI.
CVE playlist (ready-made PoCs)
Adapt public exploits into .feature scenarios:
- CVE-2023-44487 Rapid Reset
- CVE-2024-27316 CONTINUATION flood
- CVE-2019-9511..9518 (nghttp2 family: Data Dribble, Ping Flood, 0-Length Headers Leak, etc.)
- HPACK bomb (zip-bomb-like dynamic-table)
- HTTP request smuggling differentials from HTTP Garden (arxiv 2405.17737) — corpus replay against our llhttp + H1↔H2 header normalization
Acceptance
- Nightly
conformance.yml: h2spec passes (or whitelists known fails), testssl.sh JSON artifact -
tests/chaos/with the ext/async/fuzzy-tests layout (_harness/, _generated/, _frozen/, _peers/) - At least 3 topics covered by
.featurescenarios:h2_framing,h2_rapid_reset,h1_pipeline - Nightly
chaos-io.ymlwith Toxiproxy for transport chaos -
freeze.phpworks: nightly fail → manual freeze → commit to_frozen/→ stable regression
Activity
ci: nightly h2spec conformance workflow (refs #41)
ci: add testssl.sh TLS conformance to nightly workflow (refs #41)
ci: add h2load robustness smoke to conformance workflow (refs #41)
Merge pull request #42 from true-async/41-test-infra-external-conform…
EdmondDantes commentedon May 29, 2026
Slice 2 (conformance) shipped in #42 (merged):
Remaining: tlsfuzzer (deferred) + slice 3 chaos/fuzz harness. Continuing with slice 3.