sustrik / libdill

Structured concurrency in C
MIT License
1.68k stars 156 forks source link

Parallel test suite execution causes tests to fail #222

Open enter-github-username opened 1 year ago

enter-github-username commented 1 year ago

Running the test suite in parallel via the -j<number of tests to run in parallel> flag of make currently leads to test failures. This is likely caused by some tests trying to bind to the same port. If two such tests (e.g. tests/suffix and tests/prefix, both of which bind to port 5555) are executed at the same time, at least one of the tests will fail.

You may be able to reproduce this issue by running the test suite with make -j16 check. If a test is affected, the log files will contain entries like:

Address already in use [98] (tests/suffix.c:58)

A possible solution may be to use a different port to bind to for each test.