Files
craft-libs/crates/print/src
dotCooCoo 2e9aabb1a5 print tests: CUPS deadlines and lpstat limits run on a test clock, helper stages on a handshake
The CUPS deadline reader and the lpstat output limit read the time from a
clock the caller passes (the real clock in production), so the tests move
time by hand instead of waiting on it:

- A trickling peer that moves the clock 20 ms per byte gets timeouts of
  80, 60, 40 and 20 ms, then TimedOut, for reads and for writes.
- A stalled unix peer's socket waits exactly the time left.
- A closed unix peer's buffered reply is read on a clock that does not
  move, and the read at the deadline fails with TimedOut.
- A hanging lpstat -e is stopped at its limit, and the printer it would
  name 30 s later is not listed.
- The second CUPS endpoint is stopped after serving every earlier
  connection, and its request channel is empty.

The print helper child reports each stage on a loopback connection and
waits there to be released, in place of polled marker files.
2026-11-27 17:47:46 -08:00
..