1 suggestion
Optional improvements
[suggestion] · Idle timeout tests do not detect early returns
The new timeout test accepts an immediate return from a 100ms idle wait, while large_timeout does not cover sub-second timeout handling.
Location: src/test/sock_tests.cpp:668 (head).
Details and suggested fix
The timeout test checks only that Wait(100ms, ...) and WaitMany(100ms, ...) succeed and report no events. A regression that makes these waits return immediately would satisfy those assertions. Although large_timeout catches an unconditional immediate return, all its effective timeouts are whole seconds after capping to MAX_WAIT_TIMEOUT. On the select backend, losing the tv_usec component in MillisToTimeval would therefore leave both tests passing. Measure each idle wait with a steady clock and assert a generous lower bound, for example TIMEOUT / 2, while retaining the existing return-value and event checks. Avoid an upper bound: scheduler delays can lengthen the measured interval without making a correct wait fail.