]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix out-of-tree test
authorEvan Hunt <each@isc.org>
Fri, 28 Mar 2025 02:59:53 +0000 (19:59 -0700)
committerEvan Hunt <each@isc.org>
Fri, 28 Mar 2025 03:07:24 +0000 (20:07 -0700)
A recent change to the dnssec system test depended on a file
that is only in the source tree, not in the build tree, and was
therefore not available in out-of-tree builds.

bin/tests/system/dnssec/ns1/sign.sh
bin/tests/system/dnssec/ns4/named5.conf.in
bin/tests/system/dnssec/tests_sh_dnssec.py

index 63d2c58ff9f3c423effeaf5bec5a71ae750c34ec..90286fb3e6f0593a96cc1218b256139c185dfe10 100644 (file)
@@ -65,3 +65,9 @@ cp managed.conf ../ns4/managed.conf
 #
 
 keyfile_to_key_id "$ksk" >managed.key.id
+
+#
+# Also generate a broken trusted-keys file for the dnssec test.
+#
+broken=$("$KEYGEN" -q -fk -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" .)
+keyfile_to_static_ds "$broken" >../ns4/broken.conf
index 16c81264e1b7fb60ad784977b1e96bfc3bdecd96..dae14c328b0073ffcc173e8b47f9758454ee0073 100644 (file)
@@ -27,11 +27,12 @@ options {
 
 };
 
-# Note: This is deliberately wrong! The bind.keys file contains
-# the real DNS root key, so it won't work with the local toy
-# root zones used in the tests. This is to test a forwarder
-# talking to a resolver with a misconfigured trust anchor.
-include "../../../../../bind.keys";
+# Note: This contains a deliberately incorrect key,
+# so it won't work with the root zones used in the tests;
+# all signed data should SERVFAIL. This is to test the case
+# of a validating forwarder talking to a resolver that has
+# a misconfigured trust anchor.
+include "broken.conf";
 
 key rndc_key {
        secret "1234abcd8765";
index 91a8ba24eb60adadf962ae12d29cd10422269d16..ac9528245252a6c70db4bfc90f98f3db62b0bbc9 100644 (file)
@@ -147,6 +147,7 @@ pytestmark = pytest.mark.extra_artifacts(
         "ns3/upper.example.db",
         "ns3/upper.example.db.lower",
         "ns3/ds-unsupported.example.db",
+        "ns4/broken.conf",
         "ns4/managed.conf",
         "ns4/managed-keys.bind",
         "ns4/named.secroots",