]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Process comments from pieterlexis wrt tests
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 10 Sep 2025 12:55:55 +0000 (14:55 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 10 Sep 2025 13:01:43 +0000 (15:01 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/docs/upgrade.rst
regression-tests.recursor-dnssec/runtests
regression-tests.recursor-dnssec/test_Cookies.py

index fbe277bcfce3694dbdebaf7ee4ce4ed214b4f583..a5eb34520ac1e4845d00a67da39175188b6aba8b 100644 (file)
@@ -18,8 +18,8 @@ New Settings
 
 - The ``dump-cookies`` subcommand has been added to dump a table showing cookie support for each
 authoritative server contacted recently.
-- The ``clear-cookies`` subcommand has been added to clear entries from the cookie support table
-- The ``add-cookies-unsupported`` subcommand has been added to mark an authoritative server as not supporing cookies.
+- The ``clear-cookies`` subcommand has been added to clear entries from the cookie support table.
+- The ``add-cookies-unsupported`` subcommand has been added to mark an authoritative server as not supporting cookies.
 
 5.2.0 to 5.3.0
 --------------
index 3767323980bb16ba4a607add154f9ea72b6cb2a2..d8a16478241c05af346b2bc6a7c79626f194d8e2 100755 (executable)
@@ -32,8 +32,8 @@ export PDNS=${PDNS:-${PWD}/../pdns/pdns_server}
 export PDNSUTIL=${PDNSUTIL:-${PWD}/../pdns/pdnsutil}
 export PDNSMODULEDIR=${PDNSMODULEDIR:-${PWD}/../regression-tests/modules}
 
-export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor}
-export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control}
+export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/build/pdns_recursor}
+export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/build/rec_control}
 
 LIBFAKETIME_DEFAULT=/usr/lib/$(arch)-linux-gnu/faketime/libfaketimeMT.so.1 # ubuntu default
 LIBAUTHBIND_DEFAULT=/usr/lib/authbind/libauthbind.so.1
index 63427ec17a6b00258e248ed12746698f2ddd5378..3a2514363ed7568d79cc066b3c65f375d7b87612 100644 (file)
@@ -22,6 +22,7 @@ recursor:
   forward_zones:
   - zone: cookies.example
     forwarders: [%s.25, %s.26]
+  devonly_regression_test_mode: true
 outgoing:
   cookies: true
 packetcache:
@@ -95,12 +96,15 @@ packetcache:
         confdir = os.path.join('configs', self._confdir)
         # Case: rec gets a proper client and server cookie back
         self.recControl(confdir, 'clear-cookies', '*')
+        tcp1 = self.recControl(confdir, 'get tcp-outqueries')
         query = dns.message.make_query('supported.cookies.example.', 'A')
         expected = dns.rrset.from_text('supported.cookies.example.', 15, dns.rdataclass.IN, 'A', '127.0.0.1')
         res = self.sendUDPQuery(query)
         self.assertRcodeEqual(res, dns.rcode.NOERROR)
         self.assertRRsetInAnswer(res, expected)
         self.checkCookies('Supported')
+        tcp2 = self.recControl(confdir, 'get tcp-outqueries')
+        self.assertEqual(tcp1, tcp2)
 
         # Case: we get a an correct client and server cookie back
         # We do not clear the cookie tables, so the old server cookie gets re-used
@@ -113,14 +117,17 @@ packetcache:
 
     def testAuthSendsIncorrectClientCookie(self):
         confdir = os.path.join('configs', self._confdir)
-        # Case: rec gets a an incorrect client cookie back, we ignore that over TCP
+        # Case: rec gets a an incorrect client cookie back, we ignore that and go to TCP
         self.recControl(confdir, 'clear-cookies', '*')
+        tcp1 = self.recControl(confdir, 'get tcp-outqueries')
         query = dns.message.make_query('wrongcc.cookies.example.', 'A')
         expected = dns.rrset.from_text('wrongcc.cookies.example.', 15, dns.rdataclass.IN, 'A', '127.0.0.1')
         res = self.sendUDPQuery(query)
         self.assertRcodeEqual(res, dns.rcode.NOERROR)
         self.assertRRsetInAnswer(res, expected)
         self.checkCookies('Probing')
+        tcp2 = int(self.recControl(confdir, 'get tcp-outqueries'))
+        self.assertEqual(int(tcp1) + 1, int(tcp2))
 
     def testAuthSendsBADCOOKIEOverUDP(self):
         confdir = os.path.join('configs', self._confdir)