]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add a new check in "inline" system test
authorAram Sargsyan <aram@isc.org>
Thu, 7 May 2026 11:44:44 +0000 (11:44 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Mon, 22 Jun 2026 20:51:53 +0000 (20:51 +0000)
This new check floods the server with DNS UPDATE messages for an
'inline-signing yes; sig-signing-signatures 1;' zone to see if
it manages to process the updates correctly.

bin/tests/system/inline/ns3/named.conf.j2
bin/tests/system/inline/setup.sh
bin/tests/system/inline/tests_inline_incremental_updates.py [new file with mode: 0644]

index 55e204811779d216d69d86795e0f56d8c4381cd3..fd28e9da0b97812cd86e7d9e76aa4d14c5cbf20a 100644 (file)
@@ -57,6 +57,15 @@ zone "bits" {
        sig-signing-signatures 1;       // force incremental processing
 };
 
+zone "incremental-updates" {
+    type primary;
+    file "incremental-updates.db";
+    inline-signing yes;
+    dnssec-policy inline;
+    sig-signing-signatures 1;  // force incremental processing
+    allow-update { any; };
+};
+
 server 10.53.0.4 { request-ixfr no; };
 
 zone "noixfr" {
index c1b38e860639722eab4a7a3362ac8df18fe23918..50d2a07347bcf790c0929653900ae10a2a79b11a 100644 (file)
@@ -31,6 +31,7 @@ cp ns3/primary.db.in ns3/nsec3.db
 cp ns3/primary.db.in ns3/externalkey.db
 cp ns3/primary.db.in ns3/delayedkeys.db
 cp ns3/primary.db.in ns3/removedkeys-primary.db
+cp ns3/primary.db.in ns3/incremental-updates.db
 cp ns3/include.db.in ns3/include.db
 
 mkdir ns3/removedkeys
diff --git a/bin/tests/system/inline/tests_inline_incremental_updates.py b/bin/tests/system/inline/tests_inline_incremental_updates.py
new file mode 100644 (file)
index 0000000..fdc3c18
--- /dev/null
@@ -0,0 +1,65 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+import random
+import threading
+
+import dns.update
+import pytest
+
+pytestmark = pytest.mark.extra_artifacts(
+    [
+        "K*",
+        "*.out*",
+        "*/*.out*",
+        "ns*/K*",
+        "ns*/dsset-*",
+        "ns*/*.bk",
+        "ns*/*.db",
+        "ns*/*.jbk",
+        "ns*/*.jnl",
+        "ns*/*.nzd",
+        "ns*/*.signed",
+        "ns*/trusted.conf",
+        "ns3/delayedkeys.conf",
+        "ns3/removedkeys",
+    ]
+)
+
+
+def worker(server, count) -> None:
+    zone = "incremental-updates"
+    for i in range(count):
+        try:
+            sub = random.randrange(1000000)
+            update_msg = dns.update.UpdateMessage(zone)
+            update_msg.add(f"a-{sub}-{i}.{zone}.", 300, "A", "10.0.0.1")
+            server.nsupdate(update_msg)
+        except Exception:  # pylint: disable=broad-exception-caught
+            break
+
+
+def test_inline_incremental_updates(ns3):
+    """
+    Flood the server with updates to check how 'receive secure serial'
+    is coping with quick incremental updates.
+    """
+    threads_n = 10
+    updates_n = 10
+    threads = [
+        threading.Thread(target=worker, args=(ns3, updates_n), daemon=True)
+        for _ in range(threads_n)
+    ]
+
+    for thread in threads:
+        thread.start()
+    for thread in threads:
+        thread.join()