]> 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:44:28 +0000 (10:44 +0100)
commit11ff0537e1a1cff1be7fc06fe89e8eb058a53d10
treea991c6514f7af74f422a834cc12b1cbc82127184
parent4d80289abb107483bda6ba363751e5d9b92e2903
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.

(cherry picked from commit ea7bddb4ca24a9ca4d12f8ecd8fa186699f0f5ab)
lib/ns/tests/listenlist_test.c
lib/ns/tests/nstest.c