OpenCyphal / yakut

Simple CLI tool for diagnostics and debugging of Cyphal networks
https://opencyphal.org
MIT License
49 stars 10 forks source link

e2e test issues on Windows: stderr buffer too small #51

Open pavel-kirienko opened 2 years ago

pavel-kirienko commented 2 years ago

On Windows, when the integration test suite runs a process with -v or -vv, it may get blocked at an arbitrary location waiting for the parent to read its stderr. This results in non-obvious timeout errors and it may cost one hours of debugging on Windows while it works on other platforms (don't ask how I know).

The pipes are currently configured to be unbuffered because otherwise, Windows discards the output when the child process is interrupted instead of flushing the streams properly.

Perhaps the child runner should start background tasks/threads to read from the pipes so that the child process is never blocked. The runner is defined in tests/subprocess.py:

https://github.com/OpenCyphal/yakut/blob/ebcca76641fb1f28075ec01656386da2229a3fa3/tests/subprocess.py#L89