mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-27 03:51:16 -05:00
The bin/tests/system/start.pl script waits until a "running" message is logged by a given name server instance before attempting to send a version.bind/CH/TXT query to it. The idea behind this was to make the script wait until named loads all the zones it is configured to serve before telling the system test framework that a given server is ready to use; this prevents the need to add boilerplate code that waits for a specific zone to be loaded to each test expecting that. The problem is that when it looks for "running" messages, the bin/tests/system/start.pl script assumes that the existence of any such message in the named.run file indicates that a given named instance has already finished loading all zones. Meanwhile, some system tests restart all the named instances they use throughout their lifetime (some even do that a few times), for example to run Python-based tests. The bin/tests/system/start.pl script handles such a scenario incorrectly: as soon as it finds any "running" message in the named.run file it inspects and it gets a response to a version.bind/CH/TXT query, it tells the system test framework that a given server is ready to use, which might not be true - it is possible that only the "version.bind" zone is loaded at that point and the "running" message found was logged by a previously-shutdown named instance. This triggers intermittent failures for Python-based tests. Fix by improving the logic that the bin/tests/system/start.pl script uses to detect server startup: check how many "running" lines are present in a given named.run file before attempting to start a named instance and only proceed with version.bind/CH/TXT queries when the number of "running" lines found in that named.run file increases after the server is started. |
||
|---|---|---|
| .. | ||
| check | ||
| confgen | ||
| delv | ||
| dig | ||
| dnssec | ||
| named | ||
| nsupdate | ||
| plugins | ||
| rndc | ||
| tests | ||
| tools | ||
| Makefile.am | ||