bind9/bin/tests
Michał Kępień 012ca0a27d Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.
2018-03-08 13:19:54 +01:00
..
atomic Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
bigtest Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
db Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
dnssec-signzone Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
dst remove unused struct dst_context declaration 2018-02-24 17:50:08 -08:00
hashes Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
master Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
mem Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
names Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
net Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
pkcs11 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
rbt Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
resolver Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
sockaddr Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
startperf Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
system Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete 2018-03-08 13:19:54 +01:00
tasks Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
timers Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
virtual-time Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
win32 [master] add libns and remove liblwres 2017-09-08 13:47:34 -07:00
.gitignore [master] add libns and remove liblwres 2017-09-08 13:47:34 -07:00
adb_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
b8t.mk Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
b9t.mk Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
backtrace_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
byaddr_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
byname_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
cfg_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
db_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
entropy2_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
entropy_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
fromhex.pl Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
fsaccess_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
hash_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
headerdep_test.sh.in Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
inter_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Kchild.example.+003+04017.key Add a lame SIG(0) test program, since apparently there is someone else trying 2000-08-22 01:11:53 +00:00
Kchild.example.+003+04017.private Add a lame SIG(0) test program, since apparently there is someone else trying 2000-08-22 01:11:53 +00:00
keyboard_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
lex_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
lfsr_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
log_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Makefile.in don't allow a macro to end in '\' 2018-03-06 15:13:03 +11:00
makejournal.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
master_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
mempool_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
name_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
named.conf Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
ndc.conf Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
ndc.conf-include Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
nsecify.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
ratelimiter_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
rbt_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
rbt_test.out node joining no longer happens on deletion 2001-03-08 01:39:10 +00:00
rbt_test.txt Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
resolv.conf.sample Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
rwlock_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
serial_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
shutdown_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
sig0_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
sock_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
sym_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
t_api.pl Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
task_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
timer_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
wire_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
wire_test.data Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your 2000-08-01 01:33:37 +00:00
wire_test.data2 add more wire tests, yeay 1999-04-30 01:56:52 +00:00
wire_test.data3 add more wire tests, yeay 1999-04-30 01:56:52 +00:00
wire_test.data4 add more wire tests, yeay 1999-04-30 01:56:52 +00:00
zone_test.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00