]> git.ipfire.org Git - thirdparty/bind9.git/commit
Avoid rndc loadkeys race in checkds system test 12150/head
authorNicki Křížek <nicki@isc.org>
Thu, 28 May 2026 16:13:20 +0000 (16:13 +0000)
committerNicki Křížek <nicki@isc.org>
Mon, 1 Jun 2026 13:48:46 +0000 (15:48 +0200)
commita2a53931de7d26dc3b809bd9d5512d9b4c098a19
treec5b062b5ffe1f0493fda8e3e633c6ae435d354dd
parent5d7f241fdf5453301ca766082a5f4036c323d86a
Avoid rndc loadkeys race in checkds system test

The wait loop in test_checkds() called "rndc loadkeys" once per
second while polling ns9.log for expected parental-agent response
lines. Under load (notably the rbt CI job), responses to one query
batch could land after a subsequent loadkeys had already reset the
per-key DSPUBCOUNT counter in lib/dns/zone.c without cancelling the
in-flight requests. Stragglers from the earlier round then bumped the
new round's counter to parentalscnt and BIND finalized DSPublish for
zones where one parental-agent legitimately serves no DS, spuriously
failing the !DSPublish keystate assertion.

Trigger at most one loadkeys per test case and wait passively via
watch_log_from_start() / wait_for_all().  Watching from the start
of the log preserves the original implicit semantics for zones
whose DS state was already finalized by BIND's automatic checkds
polling at zone-load time -- the expected lines are already
present and the watcher returns immediately.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit 02b6239489549e44daac123f556f851dd9949b27)
bin/tests/system/checkds/tests_checkds.py