]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add test case for nsupdate hangs on large update
authorMatthijs Mekking <matthijs@isc.org>
Fri, 1 Nov 2024 12:23:20 +0000 (13:23 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 6 Dec 2024 09:26:40 +0000 (09:26 +0000)
This test case hangs, despite the update being performed on the
name server.

(cherry picked from commit 3adabb4f893be218b68676fd3651924190b10fca)

bin/tests/system/nsupdate/ns3/many-updates.test.db [new file with mode: 0644]
bin/tests/system/nsupdate/ns3/named.conf.in
bin/tests/system/nsupdate/tests.sh

diff --git a/bin/tests/system/nsupdate/ns3/many-updates.test.db b/bin/tests/system/nsupdate/ns3/many-updates.test.db
new file mode 100644 (file)
index 0000000..bb0805b
--- /dev/null
@@ -0,0 +1,14 @@
+; 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.
+
+many-updates.test. 10 IN SOA many-updates.test. hostmaster.many-updates.test. 1 3600 900 2419200 3600
+many-updates.test. 10 IN NS many-updates.test.
+many-updates.test. 10 IN A 10.53.0.3
index 041765a94703a7d531da1b20059b0253e48221ff..2c0172d2eba5afe8f40f15c3f5cf5b101a9ec185 100644 (file)
@@ -69,6 +69,13 @@ zone "too-big.test" {
        file "too-big.test.db";
 };
 
+zone "many-updates.test" {
+       type primary;
+       allow-update { any; };
+       file "many-updates.test.db";
+};
+
+
 /* Zone for testing CDS and CDNSKEY updates from other provider */
 zone "multisigner.test" {
        type primary;
index 9eb764f51fcc686c751195d4ca615ee2465803ae..be0df8aaad9a87839930a754646d56fa2cf1eaf0 100755 (executable)
@@ -587,6 +587,26 @@ EOF
   status=1
 }
 
+n=$((n + 1))
+ret=0
+i=0
+echo_i "check that nsupdate does not hang when processing a large number of updates interactively ($n)"
+{
+  echo "server 10.53.0.3 ${PORT}"
+  echo "zone many-updates.test."
+  while [ $i -le 2000 ]; do
+    echo "update add host$i.many-updates.test. 3600 IN TXT \"host $i\""
+    i=$((i + 1))
+  done
+  echo "send"
+} | $NSUPDATE
+echo_i "query for host2000.many-updates.test ($n)"
+retry_quiet 5 has_positive_response host2000.many-updates.test TXT 10.53.0.3 || ret=1
+[ $ret = 0 ] || {
+  echo_i "failed"
+  status=1
+}
+
 n=$((n + 1))
 ret=0
 echo_i "start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"