Commit 057a687
committed
api-test-ws-h2-pmd: permessage-deflate over ws-over-h2 selftest
Single-process h2 ws server + client, both offering permessage-deflate,
ctest-wired like the other api-tests (needs LWS_WITHOUT_EXTENSIONS=OFF).
The server bulk-sends a 64KB deterministic pattern in 4KB messages gated
only on lws_send_pipe_choked(); alternate messages are trivially
compressible (deflated frame far smaller than the payload) and
incompressible hash noise (deflated output overflows pmd's default 1KB
chunk buffer, forcing tx_draining_ext).
It fails if the connection is not genuinely ws-over-h2, if the client's
extended CONNECT did not offer permessage-deflate, if any server
lws_write() reports fewer bytes accepted than requested, if the pattern
corrupts, or if the transfer stalls.
Against the pre-series code it catches all three fixes: without the
client extension offer it fails the handshake check; without the
orig_len return it fails immediately with 'short write: accepted 75 of
4096'; without the encapsulated tx_draining_ext servicing it wedges at
the first incompressible message (the POLLOUT mux loop hits its sanity
limit) and times out.1 parent 611e04b commit 057a687
2 files changed
Lines changed: 460 additions & 0 deletions
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments