From e5505dae772aba56a56cdbe3449f78a6972c13fc Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Tue, 2 Jun 2026 14:53:25 +0000 Subject: [PATCH] Count distinct destinations in selfpointedglue dnstap checks Tolerates retransmissions, which would inflate a raw line count. Assisted-by: Claude:claude-opus-4-8 (cherry picked from commit aac9cc40a8a8fac8f7a9958ef85efcdfe88dc185) --- bin/tests/system/selfpointedglue/tests_selfpointedglue.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/selfpointedglue/tests_selfpointedglue.py b/bin/tests/system/selfpointedglue/tests_selfpointedglue.py index 0fb6c3e374..251fe34c39 100644 --- a/bin/tests/system/selfpointedglue/tests_selfpointedglue.py +++ b/bin/tests/system/selfpointedglue/tests_selfpointedglue.py @@ -34,8 +34,11 @@ def extract_dnstap(ns, expectedlen): ) lines = dnstapread.out.splitlines() - assert expectedlen == len(lines) - return list(map(line_to_ips_and_queries, lines)) + # Count distinct (destination, query) pairs, not raw lines: under load + # named may retransmit, adding identical entries. + ips_and_queries = list(dict.fromkeys(map(line_to_ips_and_queries, lines))) + assert expectedlen == len(ips_and_queries) + return ips_and_queries # Because DNSTAP doesn't have ordering guarantee, the order doesn't matter here.