Commit Graph
2 Commits
Author SHA1 Message Date
andrey 0e0dc0cd38 test: make regression tests fail cleanly on pre-fix code
- dispatcher tests: register the server before the client connects
  (Connect race), poll the Connected ack non-blocking with a deadline,
  keep the client socket non-blocking so a full buffer yields EAGAIN
  instead of a blocking send() past any deadline
- piethernet test: use a TCP client against a never-reading listener
  (server-object writeDevice is a no-op) and 32 MB to exceed the
  ~10 MB loopback buffers

With piethernet/pistreampacker reverted to master all four tests
fail (8 ms .. 40 s); with the fixes ctest is 342/342.
2026-08-24 17:20:49 +03:00
andrey 3abf0a0808 test: add regression tests for dispatcher write stalls and stream packer size cap
- PICloudDispatcher.ServerDisconnectWhileClientForwarding: a disconnecting
  logical server must not freeze the dispatcher while a client's read
  thread is jammed forwarding data to an unread server socket
- PICloudDispatcher.ClientRemovableWhileServerNotReading: the client's
  own Disconnect frame must be processed and the client removed even
  though the stall happens in the other connection's writeDevice()
- PIEthernet.WriteThreadStopsWhilePeerNotReading: the EAGAIN retry loop
  in writeDevice() must not prevent stopAndWait() from returning
- PIStreamPacker.RejectsOversizedPacket: a forged INT_MAX packet size
  from the stream must not be accumulated, and the packer must stay
  usable for valid packets
2026-08-24 15:26:34 +03:00