]> git.ipfire.org Git - thirdparty/bind9.git/commit
Bind to random port numbers in unit tests
authorMichał Kępień <michal@isc.org>
Wed, 8 Jan 2020 17:30:54 +0000 (18:30 +0100)
committerMichał Kępień <michal@isc.org>
Thu, 9 Jan 2020 09:32:25 +0000 (09:32 +0000)
commitea7bddb4ca24a9ca4d12f8ecd8fa186699f0f5ab
tree86aaff5b467f7fc34eebd10f24f1b6c6661a3876
parent423eee834a6277afe1cb85f70d917edfba6ae181
Bind to random port numbers in unit tests

Some unit tests need various managers to be created before they are run.
The interface manager spawned during libns tests listens on a fixed port
number, which causes intermittent issues when multiple tests using an
interface manager are run concurrently.  Make the interface manager
listen on a randomized port number to greatly reduce the risk of
multiple unit tests using the same port concurrently.
lib/ns/tests/listenlist_test.c
lib/ns/tests/nstest.c