]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix an issue with unreachable cache's unit test
authorAram Sargsyan <aram@isc.org>
Thu, 6 Nov 2025 11:33:41 +0000 (11:33 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Tue, 2 Dec 2025 16:03:26 +0000 (16:03 +0000)
commit8c8bf4e45dc6e742dd27363e9613411dc1edd761
tree75e77487ed5b0e0856b8197ee6582552552b91e1
parentb37833615531b0eedabffa1a14771edc305d8d86
Fix an issue with unreachable cache's unit test

The isc_stdtime_now() function used by dns_unreachcache_find() to
check if the entry needs to be expired has a one-second resolution,
and the test sleeps for 1 second and then for the amount of the
expiration interval, which in a worst-case scenario can cause the
test to fail, because the entry was expected to be expired but it
wasn't. Sleep for 2 seconds instead of 1 to avoid the timing
resolution issue.
tests/dns/unreachcache_test.c