2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

43024 Commits

Author SHA1 Message Date
Mark Andrews
c360100ab5 [9.20] new: ci: Update Clang to version 20
Backport of MR !10565

Merge branch 'backport-mnowak/llvm-20-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10634
2025-06-25 15:02:19 +10:00
Mark Andrews
5f7ba5e1f9 Ignore reformat sources with up-to-date clang-format-20
(cherry picked from commit d36b0f2b435222e3291d99bb3657411e29d25a63)
2025-06-25 13:33:14 +10:00
Mark Andrews
53738b0e5e Use clang-format-20 to update formatting
(cherry picked from commit 422b9118e878d3106c84b2eac44371f7143f320b)
2025-06-25 13:32:08 +10:00
Mark Andrews
072f5d0009 Preserve brackets around string concatenation
We need disable clang-format here to preserve the brackets around
the string concatenation to prevent -Wstring-concatenation -Werror
breaking the build.

(cherry picked from commit eeafcee7ad07ae793602a3640b7f05d3cb26ff9f)
2025-06-25 13:26:13 +10:00
Mark Andrews
e70a976958 Preserve brackets in DNS_SLABHEADER_GETATTR macro
We need to turn off clang-format to preserve the brackets as
'attribute' can be an expression and we need it to be evaluated
first.

Similarly we need the entire result to be evaluated independent of
the adjoining code.

(cherry picked from commit 3620db5ea6f163199cf5a3ad09c32d02b374f748)
2025-06-25 13:26:13 +10:00
Michal Nowak
a3c10ad7d1 Update Clang to version 20
(cherry picked from commit 31922536c05a69a7ee60e9bd4aa015232c062b15)
2025-06-25 13:26:11 +10:00
Nicki Křížek
ec4ae08e4c [9.20] chg: ci: Add newline for changelog CI job
In case the changelog file doesn't have an empty line at the end of the
file, the job may fail with the following error:

WARNING: Bullet list ends without a blank line; unexpected unindent.

This typically happens in MRs targeting the -S edition, as those
changelogs usually don't have an empty newline. This change ensures the
changelog job can pass and verify the title/desc contents even in those
cases.

Backport of MR !10628

Merge branch 'backport-nicki/ci-changelog-add-missing-newline-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10632
2025-06-24 17:41:55 +02:00
Nicki Křížek
01f20420b2 Add newline for changelog CI job
In case the changelog file doesn't have an empty line at the end of the
file, the job may fail with the following error:

WARNING: Bullet list ends without a blank line; unexpected unindent.

This typically happens in MRs targeting the -S edition, as those
changelogs usually don't have an empty newline. This change ensures the
changelog job can pass and verify the title/desc contents even in those
cases.

(cherry picked from commit ebf155ecc82fbf20576ce1cf8e6c9521430b4c66)
2025-06-24 15:31:56 +00:00
Nicki Křížek
a40e1f0e65 [9.20] chg: test: Make extra_artifacts check optional
There is an ongoing debate about the usefulness of the extra artifacts
check. While it might be useful to detect unexpected behaviour in some
tests, it feels extraneous in many cases. This change provides a middle
ground by making the artifact checking optional. This might be
especially useful for writing new tests, since the author gets to decide
whether the check is useful -- and can utilize it, or can skip it for
sake of brevity.

Backport of MR !10622

Merge branch 'backport-nicki/make-extra-artifacts-check-optional-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10629
2025-06-24 17:12:59 +02:00
Nicki Křížek
da7cab2243 Make extra_artifacts check optional
There is an ongoing debate about the usefulness of the extra artifacts
check. While it might be useful to detect unexpected behaviour in some
tests, it feels extraneous in many cases. This change provides a middle
ground by making the artifact checking optional. This might be
especially useful for writing new tests, since the author gets to decide
whether the check is useful -- and can utilize it, or can skip it for
sake of brevity.

(cherry picked from commit c06dc71cd5a307fcbbb20699f79ff753300e3c92)
2025-06-24 14:57:59 +00:00
Michal Nowak
d8936471a4 [9.20] new: ci: Add Alpine Linux 3.22
Backport of MR !10539

Merge branch 'backport-mnowak/alpine-3.22-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10623
2025-06-24 15:52:25 +02:00
Michal Nowak
cfb36234ec
Add Alpine Linux 3.22
(cherry picked from commit b20c71c2dc7bc1137d2336dd3569bdb5b87a4b59)
2025-06-24 15:12:16 +02:00
Michał Kępień
fc3282f866 [9.20] chg: ci: move "stress" test generation script to QA repo
Move the util/generate-stress-test-configs.py script from the BIND 9
source repository to the BIND 9 QA repository.  This simplifies the
maintenance of that script by eliminating the need to backport every
change applied to it to multiple branches.

Backport of MR !10585

Merge branch 'backport-michal/move-stress-test-generation-script-to-qa-repo-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10612
2025-06-21 04:58:59 +00:00
Michał Kępień
1a7931cf20
Move "stress" test generation script to QA repo
Move the util/generate-stress-test-configs.py script from the BIND 9
source repository to the BIND 9 QA repository.  This simplifies the
maintenance of that script by eliminating the need to backport every
change applied to it to multiple branches.

(cherry picked from commit 4f7f420534fc939107654a39ab94aa8d4e9d9c45)
2025-06-21 06:53:12 +02:00
Mark Andrews
2c11ebdd0e [9.20] fix: test: verify-axfr.db gets updated too fast in mirror test
Add a 1 second wait before updating verify-axfr.db so that the
modification time of the file changes.

Closes #5376

Backport of MR !10586

Merge branch 'backport-5376-verify-axfr-db-gets-updated-too-fast-in-mirror-test-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10609
2025-06-19 20:19:17 +00:00
Mark Andrews
9bc7a73e50 verify-axfr.db gets updated too fast in mirror test
Add a 1 second wait before updating verify-axfr.db so that the
modification time of the file changes.

(cherry picked from commit c19956b3cbf0ae55303266633dad2a1eca677224)
2025-06-19 16:27:45 +00:00
Nicki Křížek
ea48c1e322 [9.20] fix: test: Ignore softhsm2 errors when deleting token in keyfromlabel test
In some rare cases, the softhsm2 utility reports failure to delete the
token directory, despite the token being found. Subsequent attempts to
delete the token again indicate that the token was deleted.

Ignore this cleanup error, as it doesn't prevent our tests from working
properly. There is also an attempt to delete the token before the test
starts which ensures a clean state before the test is executed, in case
there's actually a leftover token.

Closes #5244

Backport of MR !10607

Merge branch 'backport-5244-ignore-softhsm2util-delete-token-error-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10608
2025-06-19 14:25:07 +00:00
Nicki Křížek
e19e108698 Ignore softhsm2 errors when deleting token in keyfromlabel test
In some rare cases, the softhsm2 utility reports failure to delete the
token directory, despite the token being found. Subsequent attempts to
delete the token again indicate that the token was deleted.

Ignore this cleanup error, as it doesn't prevent our tests from working
properly. There is also an attempt to delete the token before the test
starts which ensures a clean state before the test is executed, in case
there's actually a leftover token.

(cherry picked from commit e786a2e950411fb3ffe1aed140cc4520e4ffd74a)
2025-06-19 13:52:16 +00:00
Nicki Křížek
270970a461 [9.20] chg: test: Improve logging from isctest.run.retry_with_timeout
Allow use of exception (and by extension, assert statements) in the
called function in order to extract essential debug information about
the type of failure that was encountered.

In case the called function fails to succeed on the last retry and
raised an exception, log it as error and set it as the assert message to
propagate it through the pytest framework.

Closes #5324

Backport of MR !10580

Merge branch 'backport-5324-pytest-isctest-run-logging-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10605
2025-06-19 13:41:17 +00:00
Nicki Křížek
455766e643 Use time.monotonic() for time measumeremts in pytest
For duration measurements, i.e. deadlines and timeouts, it's more
suitable to use monotonic time as it's guaranteed to only go forward,
unlike time.time() which can be affected by local clock settings.

(cherry picked from commit 069e4ef0f72bfe045123db817908460144ff70f7)
2025-06-19 13:06:39 +00:00
Nicki Křížek
3e927e43d7 Move param to isctest.util
(cherry picked from commit 481b46ffccbdb6e0fbdb13a8bc437d50e44a4ca9)
2025-06-19 13:06:39 +00:00
Nicki Křížek
ab9b2c947f Improve logging from isctest.run.retry_with_timeout
Allow use of exception (and by extension, assert statements) in the
called function in order to extract essential debug information about
the type of failure that was encountered.

In case the called function fails to succeed on the last retry and
raised an exception, log it as error and set it as the assert message to
propagate it through the pytest framework.

(cherry picked from commit 620c884133f1cac13efebaf381855462a123927c)
2025-06-19 13:06:39 +00:00
Matthijs Mekking
35efa742b0 [9.20] fix: usr: Fix purge-keys bug when using views
Previously, when a DNSSEC key was purged by one zone view, other zone views would return an error about missing key files. This has been fixed.

Closes #5315

Backport of MR !10550

Merge branch 'backport-5315-fix-spurious-some-key-files-are-missing-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10598
2025-06-19 10:17:03 +00:00
Matthijs Mekking
54a68a4a97 Fix spurious missing key files log messages
This happens because old key is purged by one zone view, then the other
is freaking out about it.

Keys that are unused or being purged should not be taken into account
when verifying key files are available.

The keyring is maintained per zone. So in one zone, a key in the
keyring is being purged. The corresponding key file is removed.

The key maintenance is done for the other zone view. The key in that
keyring is not yet set to purge, but its corresponding key file is
removed. This leads to "some keys are missing" log errors.

We should not check the purge variable at this point, but the
current time and purge-keys duration.

This commit fixes this erroneous logic.

(cherry picked from commit d494698852e21e25d65d1e2453813a7b19a0a755)
2025-06-19 11:42:04 +02:00
Matthijs Mekking
61b2b4074e Test purge-keys with views
Create a test scenario where a signed zone is in multiple views and
then a key may be purged. This is a bug case where the key files are
removed by one view and then the other view starts complaining.

(cherry picked from commit 752d8617f558130cc552cae0e903aca318a3ef02)
2025-06-19 11:42:03 +02:00
Michal Nowak
bf2ffe7aba Merge tag 'v9.20.10' into bind-9.20 2025-06-19 11:27:36 +02:00
Matthijs Mekking
950314df06 [9.20] chg: test: Rewrite kasp system test to pytest (6)
These test cases involve a reconfig, dnssec policy changes.

Backport of MR !10295

Merge branch 'backport-matthijs-pytest-rewrite-kasp-system-test-6-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10594
2025-06-19 09:18:40 +00:00
Matthijs Mekking
546fdb9c20 Remove kasp shell script remainders
Now that all tests have been converted, we can remove 'kasp/tests.sh'
and 'kasp/tests_sh_kasp.py'.

(cherry picked from commit 6994a604a7943cccfb60d62a0a38ce8fa8f0e8ed)
2025-06-18 14:47:17 +02:00
Matthijs Mekking
383605c902 Convert algorithm rollover tests to pytest
Roll the algorithm rollover test cases over to the rollover directory
and rewrite using pytest.

(cherry picked from commit 80992c7b96d0fe1cc10130963766225780dd6ed1)
2025-06-18 14:47:07 +02:00
Matthijs Mekking
ffccf1fe8b Convert going insecure kasp test to pytest
When going insecure, we publish CDS and CDNSKEY DELETE records. Update
the check_apex function to test this.

Also, skip some tests in the 'check_rollover_step()' function. If
we change the DNSSEC Policy, keys that no longer match the policy will
be retired. When this exactly happens is hard to determine, as it
happens on the reconfigure. So for these tests, we skip the key timing
metadata checks.

Also, the zone becomes unsigned, so don't call 'check_zone_is_signed'
in those cases.

(cherry picked from commit b1d8217d1a39f798983152345f29c48ffa2427f9)
2025-06-18 12:20:45 +00:00
Matthijs Mekking
62adf9957f Convert policy changes tests to pytest
These test cases involve a reconfiguration. The first one is a zone
that changes from dynamic to inline-signing. The others are tests that
key lifetimes are updated correctly after changing them.

(cherry picked from commit de3c0970eb0ef9dea6e18a26f04b2c2810b68da0)
2025-06-18 12:20:45 +00:00
Mark Andrews
7a0620bc54 [9.20] fix: test: unstable rollover/tests_rollover.py::test_rollover_manual
The state files need to be written before trying to identify zsk/ksk
keys.  Wait for "keymgr: manual-rollover.kasp done" to appear in
named.run first.

Closes #5371

Backport of MR !10587

Merge branch 'backport-5371-unstable-rollover-tests_rollover-py-test_rollover_manual-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10589
2025-06-17 08:30:17 +00:00
Mark Andrews
3bb5c3c52b unstable rollover/tests_rollover.py::test_rollover_manual
The state files need to be written before trying to identify zsk/ksk
keys.  Wait for "keymgr: manual-rollover.kasp done" to appear in
named.run first.

(cherry picked from commit 80fedf7fcf85bb4c51a573c7dc166b36b6f71991)
2025-06-17 07:56:12 +00:00
Mark Andrews
47108af9f2 [9.20] new: usr: Add support to set and display the CO flag
Add support to display the CO (Compact denial of existence Ok flag) when displaying messages.

Add support to set the CO flag when making queries in dig (+coflag).

Closes #5319

Backport of MR !10482

Merge branch 'backport-5319-add-support-to-set-and-display-the-co-flag-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10578
2025-06-13 11:52:39 +00:00
Mark Andrews
cedc121ac3 Add "undefined" to +ednsflags description
Reflow help message.

(cherry picked from commit bbfb7ebda2da0998ec04adf6553f115b1b8ef302)
2025-06-13 20:33:45 +10:00
Mark Andrews
de665b6570 Add tests for 'dig +coflag'
(cherry picked from commit c56af212f06556f6009c0509a02b300200c055c1)
2025-06-13 20:31:34 +10:00
Mark Andrews
c3c3b61da1 Add CO support to dig
Dig now support setting the EDNS CO as flag using "+coflag" /
"+nocoflag" rather than as part of +ednsflags.

(cherry picked from commit 6c28411c55d595e3c9ce3f8d1754b24875eb5306)
2025-06-13 20:31:31 +10:00
Mark Andrews
75a25f5720 [9.20] fix: test: nsec3 test updates nsec3-ent.kasp.db too fast
Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5365

Backport of MR !10570

Merge branch 'backport-5365-nsec3-test-updates-nsec3-ent-kasp-db-too-fast-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10577
2025-06-13 09:40:50 +00:00
Mark Andrews
9ad190c7f2 nsec3-ent.kasp.db is updated too fast for rndc reload
ensure a second has elasped before updating the zone file
by adding 'sleep 1' to test.sh

(cherry picked from commit 52c29e3ab28794e84c629970f097d6fcac2b8dba)
2025-06-13 08:11:23 +00:00
Mark Andrews
9a31929684 [9.20] fix: test: test_xferquota.py reloads zone file too fast
Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5366

Backport of MR !10571

Merge branch 'backport-5366-test_xferquota-py-reloads-zone-file-too-fast-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10575
2025-06-13 08:10:49 +00:00
Mark Andrews
1ede0fc9d7 changing.db is updated too fast
ensure a second has elasped before updating the zone file
by adding 'time.sleep(1)' to xferquota/tests_xferquota.py

(cherry picked from commit d8d14cb780410ea0955d7152223e01b7a1b6d1fa)
2025-06-13 07:11:05 +00:00
Evan Hunt
4916fe0c6b [9.20] fix: usr: Use IPv6 queries in delv +ns
`delv +ns` invokes the same code to perform name resolution as `named`,
but it neglected to set up an IPv6 dispatch object first. Consequently,
it was behaving more like `named -4`. It now sets up dispatch objects
for both address families, and performs resolver queries to both v4 and v6
addresses, except when one of the address families has been suppressed
by using `delv -4` or `delv -6`.

Closes #5352

Backport of MR !10563

Merge branch 'backport-5352-delv-ipv6-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10573
2025-06-13 04:39:20 +00:00
Evan Hunt
ea9f4749ed add tests for 'delv +ns -4' and '-6'
check that `delv +ns` sends iterative queries over both address
families when -4 and -6 are not used, and suppresses queries
appropriately when they are.

(cherry picked from commit d29f1d171050580fde7e1ff3bc70f4c8157a4c1f)
2025-06-12 21:03:25 -07:00
Evan Hunt
ace3b4eec8 Use ipv6 queries in delv +ns
`delv +ns` invokes the same code to perform name resolution as `named`,
but it neglected to set up an IPv6 dispatch object first. Consequently,
it was behaving more like `named -4`.

It now sets up dispatch objects for both address families, and performs
resolver queries to both v4 and v6 addresses, except when one of the
address families has been suppressed by using `delv -4` or `delv -6`.

(cherry picked from commit 70ce3136bd533b2c3caa8e2f81dd631c85e2eab9)
2025-06-13 03:12:56 +00:00
Michal Nowak
a81ffb1ee8 chg: doc: Set up version for BIND 9.20.11
Merge branch 'mnowak/set-up-version-for-bind-9.20.11' into 'bind-9.20'

See merge request isc-projects/bind9!10568
2025-06-11 07:25:02 +00:00
Michal Nowak
6c06154f74 Update BIND version to 9.20.11-dev 2025-06-11 09:23:42 +02:00
Michal Nowak
6107035984
Update BIND version for release v9.20.10 2025-06-06 12:19:20 +02:00
Michal Nowak
73f12f57d7 new: doc: Prepare documentation for BIND 9.20.10
Merge branch 'mnowak/prepare-documentation-for-bind-9.20.10' into 'v9.20.10-release'

See merge request isc-private/bind9!806
2025-06-06 10:15:23 +00:00
Michal Nowak
a2212aa74c
Update docs to reflect 9.20 has become ESV 2025-06-06 11:56:11 +02:00
Michal Nowak
7fdd3cd656
Tweak and reword release notes 2025-06-06 11:41:07 +02:00