Commit graph

44811 commits

Author SHA1 Message Date
Andoni Duarte Pintado
ae76829157 Add faster CI jobs to the "quick-checks" stage
Given the short runtime (<1min) of the "linkcheck" and
"generate-tsan-stress-test-configs" CI jobs, move them to the
"quick-checks" stage.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
4f89d32bff Move CI stage "other-checks" right after "quick-checks"
Move CI stage "other-checks" right after "quick-checks" and get the jobs
in it as close to each other as possible in .gitlab-ci.yml.

Since no job is allowed to depend (via "needs") on any job that is
assigned to a stage later than its own, move the "tsan:stress" and
"gcov" jobs to the "system" stage.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
ba5844a1de Move slower CI jobs out of "quick-checks" stage
Jobs with more than one minute of runtime are not considered for the
small VM.

The "tarball-create" job goes to the more appropriate "build" stage.

"coccinelle" and "checkbashisms" are moved to the generic
"other-checks".
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
e61bc3ad72 Create "other_checks_job" anchor in CI yaml
Use an anchor for the common parts of "other-checks" jobs in CI yaml.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
6d442c4a06 Rename the "postcheck" stage to "other-checks" in CI
Rename the "postcheck" CI stage to the more generic "other-checks".
Slower jobs that still run in autoscaled runners belong here, as opposed
to the lightweight ones in "quick-checks".
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
9aa5041a88 Rename the "precheck" stage in CI to "quick-checks"
Most jobs in the "precheck" stage spend more time setting up their
environment than running the script (seconds), this allows us to add a
small always on dedicated runner instead of the autoscaled ones.

Hence, the stage is renamed to "quick-checks", and a tag "smalljob" is
added to the anchor so that these jobs are picked by the dedicated
runner.
2026-01-23 11:57:40 +01:00
Matthijs Mekking
d0f4daac3c chg: nil: Refactor kasp attach and detach code
Use the now more common `ISC_REFCOUNT_IMPL`.

Merge branch 'matthijs-refactor-kasp-attach' into 'main'

See merge request isc-projects/bind9!11466
2026-01-23 10:37:48 +00:00
Matthijs Mekking
b68069f275 Refactor dns_kasp_attach/detach
Replace implementation with ISC_REFCOUNT_IMPL.
2026-01-23 09:59:52 +00:00
Andoni Duarte
fafe59c745 fix: ci: Read the Docs picking old version when stable tag is updated
Read the Docs fails to pick the latest version when updating the `stable` tag, i.e. a build is triggered but it takes the previous version of it. This is a known bug in RtD: https://github.com/readthedocs/readthedocs.org/issues/10838.

The only approach that seems to solve this on our end, is to wait some time and trigger the build again so that it picks the latest version of the tag.

Merge branch 'andoni/fix-rtd-picking-old-version-when-stable-branch-update' into 'main'

See merge request isc-projects/bind9!11475
2026-01-22 18:40:33 +00:00
Andoni Duarte Pintado
168b15cfd9 Fix Read the Docs stable branch update bug
Read the Docs fails to pick the latest version of the stable tag when
updated, i.e. a build is triggered but it takes the previous version.
This commit triggers a second build after 5 minutes to ensure that the
correct tag version is used for the documentation.

This is a known bug in RtD:
https://github.com/readthedocs/readthedocs.org/issues/10838.
2026-01-22 13:25:33 +01:00
Nicki Křížek
878ae0acd4 fix: nil: Add missing sources to named-checkconf
The included defaultconfig.h in named-checkconf uses bind.keys.h.

Closes #5709

Merge branch '5709-meson-freebsd-compilation' into 'main'

See merge request isc-projects/bind9!11474
2026-01-22 11:23:38 +01:00
Nicki Křížek
a5f0c6588c Add missing sources to named-checkconf
The included defaultconfig.h in named-checkconf uses bind.keys.h.
2026-01-22 09:57:54 +01:00
Nicki Křížek
d1813a2db1 fix: ci: Apply black formatting changes
Generated by black 26.1.0 which got updated in CI.

Merge branch 'nicki/python-black' into 'main'

See merge request isc-projects/bind9!11471
2026-01-22 09:41:31 +01:00
Nicki Křížek
bb6d7a0fc3 Apply black formatting changes
Generated by black 26.1.0 which got updated in CI.
2026-01-22 09:41:21 +01:00
Colin Vidal
60b2a5035c chg: nil: fix resolver doc in the response context
Fixes a couple of comment/documentation issues in the resolver.

Merge branch 'colin/resolver-doc' into 'main'

See merge request isc-projects/bind9!11465
2026-01-22 09:11:36 +01:00
Colin Vidal
bc1a66a1d0 resolver: add comment when recursing
When a fetch result gets a delegation, `rctx_referral()` sets the
`rctx->get_nameserver = true`, which tells the resolver to retry another
server, not because of an error with the current server, but simply to
follow the delegation.

Update the comment of `rctx_nextserver()` which is quite confusing here
(as it's not immediately obvious from the code how we recurse when
getting a delegation back from a query).

Also add a log line, which helps figuring out this is happening.
2026-01-22 07:31:00 +01:00
Colin Vidal
6e63d5d02a fix resolver query response doc
In case on positive response, the `rctx_authority_positive()` function
is called to scan the AUTHORITY section to find NS servers and related
RR (glues) to be cached.

The doc says the function was called `rctx_authority_scan()`, but it is
called `rctx_authority_positive()`.
2026-01-22 07:31:00 +01:00
Nicki Křížek
b0c2670cb8 chg: pkg: Update requirements for system test suite
Python 3.10 or newer is now required for running the system test suite. The required python packages and their version requirements are now tracked in `bin/tests/system/requirements.txt`.

Support for pytest 9.0.0 has been added its minimum supported version has been raised to 7.0.0. The minimum supported dnspython version has been raised to 2.3.0.

Closes #5690 

Closes #5614

Merge branch 'nicki/pytest-9-compat' into 'main'

See merge request isc-projects/bind9!11415
2026-01-21 16:11:25 +01:00
Nicki Křížek
08630ca744 Silence incorrect pylint warnings for hypothesis.assume()
With hypothesis>6.148.3, pylint generates

W0101: Unreachable code (unreachable)

when any code is present after hypothesis.assume(). Silence these until
it is fixed upstream.

See https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217
2026-01-21 16:07:31 +01:00
Nicki Křížek
1291fa1a6d Remove hypothesis version checks
The minimum required hypothesis version has been set in requirements.txt
and no longer needs to be checked at runtime.

Since the hypothesis package is now a mandatory prerequisite, include it
in isctest as the other subpackages.
2026-01-21 16:07:31 +01:00
Nicki Křížek
ce385d8100 Remove compatibility hacks for dnspython<2.7.0
The minimum required dnspython version is now 2.7.0 and those
compatibility hacks can be dropped.
2026-01-21 16:07:31 +01:00
Nicki Křížek
144779f3e5 Prefer Python 3.12 if available
This ensures that python3.12 is used testing on older distributions
like EL8 and EL9, where the platform default python3 is older.

python3.11 was explicitly added due to FreeBSD, which doesn't have that
binary symlinked to any other name (like python3). Previously, it worked
only incidentally - when python3 was listed first, it triggered special
meson code for python detection, which is no longer the case when
python3.12 is listed first.
2026-01-21 16:07:31 +01:00
Nicki Křížek
ac8e2905b8 Bump the minimum required python version to 3.10
Drop support of EoL python versions for running system tests. The
maintenance cost of supporting end of life ecosystem, especially Python
3.6 on EL8 and the related outdated packages (pytest, dnspython, ...),
has become unreasonable.
2026-01-21 16:07:31 +01:00
Nicki Křížek
e276c3d5bd Remove pytest<7 compatibility hacks
Minimum pytest version has been bumped to 7.0.0, thus these are no
longer needed.
2026-01-21 16:07:31 +01:00
Nicki Křížek
093bef9211 Add support for pytest>=9.0.0
Use collection_path rather than the deprecated path argument for
pytest_ignore_collect() hook.

The collection_path argument was added in pytest 7.0.0, which is the
minimum supported pytest version from now on.
2026-01-21 16:07:31 +01:00
Nicki Křížek
628e16d057 Add requirements.txt for system tests
This file lists the required Python packages and versions for running
system tests. The easiest way to obtain them is:

    pip install -r requirements.txt

The minimum dnspython version is 2.7.0 because it supports TSIG parsing
without validation (for tsig/tests_tsig_hypothesis.py) and wire() (for
names/tests_names.py).

The minimum pytest version was bumped to 7.0.0 because it supports the
collection hook API required by pytest 9.

The minimum hypothesis version was set to 4.41.2 as prior versions might
have issues on FIPS systems.
2026-01-21 16:07:31 +01:00
Nicki Křížek
3d91b5c451 Merge tag 'v9.21.17' 2026-01-21 14:35:17 +00:00
Arаm Sаrgsyаn
0c1577b848 fix: dev: Fix a bug in qpzone.c:first_existing_header_indirect()
There is a bug in qpzone.c:first_existing_header_indirect() where
it does not advance the pointer in the FOREACH type loop.

Remove the static function altogether, as it was used only once and
had some other problems too, and use simpler custom code instead in
the place where it was used.

Closes #5691

Merge branch '5691-qpzone.c-first_existing_header_indirect-fix' into 'main'

See merge request isc-projects/bind9!11460
2026-01-21 10:47:31 +00:00
Aram Sargsyan
dd313f41c5 Add a new dbversion unit test
Test that closing a writer with a rollback, then opening another
writer and adding a rdataset (while still holding the node reference)
works correctly.

This test checks that the bugfix in the previous commit is correct.
2026-01-21 10:47:17 +00:00
Aram Sargsyan
d48df6b084 Remove qpzone.c:first_existing_header_indirect() which had bugs
The first_existing_header_indirect() static function is used only
in one place and it has bugs:

1. It doesn't advance the pointer and can cause an infinite loop
   if it doesn't break out from the loop on the first iteration.
2. It doesn't check if the header EXISTS, though its name indicates
   that it should.
3. Even if the infinite loop bug is fixed, it would eventually
   return the last checked header's pointer even if all the
   candidates do not match the criteria of the selection.

Instead of fixing it, remove the function and use simpler code in
the place where it was being called.
2026-01-21 10:47:17 +00:00
Mark Andrews
9c646e5213 fix: test: Fix timing issues in nsec3/tests_nsec3_reconfig.py
`ns3/nsec3-ent.kasp.db` is regenerated too fast resulting in
the subsequent `rndc reload` call failing.  This has been
fixed.

Closes #5707

Merge branch '5707-timing-issues-in-nsec3-tests_nsec3_reconfig-py' into 'main'

See merge request isc-projects/bind9!11467
2026-01-21 21:25:58 +11:00
Mark Andrews
f01497e05b Fix timing issues in nsec3/tests_nsec3_reconfig.py
ns3/nsec3-ent.kasp.db is regenerated too fast resulting in
the subsequent 'rndc reload' call failing.  This has been
fixed.
2026-01-21 16:01:57 +11:00
Mark Andrews
fbab0d546e fix: dev: Use const pointer with strchr of const pointer
Closes #5694

Merge branch '5694-fedora-builds-with-werror' into 'main'

See merge request isc-projects/bind9!11394
2026-01-20 17:00:11 +11:00
Mark Andrews
af379e10cc Use const pointer with strchr of const pointer
C23 now has qualifier preserving standard functions for strchr,
bsearch, strpbrk, strrchr, strstr, memchr.  There where a few places
where the return value was not assigned to a const qualified pointer.
These have been fixed.
2026-01-20 16:23:58 +11:00
Colin Vidal
b40f92eb26 chg: dev: remove sigrdataset from dns_view_findzonecut()
Since the `sigrdataset` "output" parameter of `dns_view_findzonecut()` is never used (always called with NULL), it is now removed. As the resolver is moving towards a parent-centric direction, there is no point having a signature for the NS record (which is not authoritative in the parent, so never signed) when `dns_view_findzonecut()` is called.

Also, rename `dns_view_findzonecut()` as `dns_view_bestzonecut()` as it is used only in the context where the closest name servers for a name need to be queried and to avoid ambiguities with other code flows using `dns_db_findzonecut()`.

Merge branch 'colin/findzonecut-removesig' into 'main'

See merge request isc-projects/bind9!11444
2026-01-16 08:29:45 +01:00
Colin Vidal
e8b0d4749c rename dns_view_findzonecut() into dns_view_bestzonecut()
`dns_view_findzonecut()` is used only in the context where the closest
name servers for a name need to be queried.  In the future, this API
will also return the glues (if known) for those name servers, as well
as (exclusively, if both NS and DELEG exist) the DELEG record.

To avoid ambiguities with other code flows using `dns_db_findzonecut()`,
`dns_view_findzonecut()` has been renamed into `dns_view_bestzonecut()`.
2026-01-16 07:52:56 +01:00
Colin Vidal
18d6b94c1f remove sigrdataset from dns_view_findzonecut()
Since the `sigrdataset` "output" parameter of `dns_view_findzonecut()`
is never used (always called with NULL), it is now removed.

Also, since the resolver is moving towards a parent-centric direction,
there is no point having a signature for the NS record (which is not
authoritative in the parent, so never signed) in the contextes where
`dns_view_findzonecut()` is called.
2026-01-15 19:48:30 -08:00
Arаm Sаrgsyаn
9379ee2c1f fix: test: Fix a false positive compiler warning/error
When built with '-Doptimization=1', GCC produces a compiler warning:

    In file included from ../lib/isc/include/isc/lib.h:44,
                     from ../tests/dns/qp_test.c:26:
    ../tests/dns/qp_test.c: In function ‘check_predecessors_withchain’:
    ../lib/isc/include/isc/util.h:182:33: error: ‘ival’ may be used uninitialized [-Werror=maybe-uninitialized]
      182 |         (((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
          |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/cmocka.h🔢5: note: in expansion of macro ‘_assert_int_equal’
     1234 |     _assert_int_equal(cast_to_largest_integral_type(a), \
          |     ^~~~~~~~~~~~~~~~~
    ../tests/dns/qp_test.c:859:18: note: ‘ival’ was declared here
      859 |         uint32_t ival;
          |                  ^~~~

This is apparently a false positive, because the qpiter_prev_with_name()
function, when returning ISC_R_SUCCESS, sets the 'ival' (passed to
it by a pointer), and the caller checks that the return value is
ISC_R_SUCCESS before using 'ival'.

Initialize the 'ival' variable to 0 anyway to avoid the build error.

Closes #5704

Merge branch '5704-qp_test-uninitialized-false-positive-error-fix' into 'main'

See merge request isc-projects/bind9!11455
2026-01-15 17:50:33 +00:00
Aram Sargsyan
e2994d2b1a Fix a false positive compiler warning/error
When built with '-Doptimization=1', GCC produces a compiler warning:

    In file included from ../lib/isc/include/isc/lib.h:44,
                     from ../tests/dns/qp_test.c:26:
    ../tests/dns/qp_test.c: In function ‘check_predecessors_withchain’:
    ../lib/isc/include/isc/util.h:182:33: error: ‘ival’ may be used uninitialized [-Werror=maybe-uninitialized]
      182 |         (((a) == (b)) ? (void)0 : (_assert_int_equal(a, b, f, l), abort()))
          |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/cmocka.h🔢5: note: in expansion of macro ‘_assert_int_equal’
     1234 |     _assert_int_equal(cast_to_largest_integral_type(a), \
          |     ^~~~~~~~~~~~~~~~~
    ../tests/dns/qp_test.c:859:18: note: ‘ival’ was declared here
      859 |         uint32_t ival;
          |                  ^~~~

This is apparently a false positive, because the qpiter_prev_with_name()
function, when returning ISC_R_SUCCESS, sets the 'ival' (passed to
it by a pointer), and the caller checks that the return value is
ISC_R_SUCCESS before using 'ival'.

Initialize the 'ival' variable to 0 anyway to avoid the build error.
2026-01-15 17:49:29 +00:00
Michal Nowak
0f7095f398 new: ci: Add minimal:gcc:trixie:amd64 jobs
Closes #5544 

Closes #5560

Merge branch '5544-add-gcc-minimal-amd64-jobs' into 'main'

See merge request isc-projects/bind9!11072
2026-01-15 14:31:15 +01:00
Michal Nowak
ea48200a72 Do not run unwritable dump-file check as root
When run as root, the "chmod -w" command is not an effective guard
against rndc dumping the DB to file.
2026-01-15 14:30:37 +01:00
Michal Nowak
e4cf76611e Add minimal:gcc:trixie:amd64 jobs 2026-01-15 14:30:37 +01:00
Michal Nowak
2a4355331a Fix forward ns4 when statistics-channels is disabled
With statistics-channels disabled, ns4 fails to start with:

    option 'statistics-channels' was not enabled at compile time
2026-01-15 14:30:37 +01:00
Michal Nowak
876060f3ef fix: test: Portions of two dnssec-malformed-dnskey tests need querytrace
Without querytrace set, test_malformed_ecdsa and test_multiple_rrsigs
fail on the log_validation_failed string.

Merge branch 'mnowak/dnssec-malformed-dnskey-needs-querytrace' into 'main'

See merge request isc-projects/bind9!11454
2026-01-15 14:07:25 +01:00
Michal Nowak
d03b3f5a1d
Portions of two dnssec-malformed-dnskey tests need querytrace
Without querytrace set, test_malformed_ecdsa and test_multiple_rrsigs
fail on the log_validation_failed string.
2026-01-15 13:03:19 +01:00
Štěpán Balážik
3011bb7a4e chg: test: Use isctest.asyncserver in the "ixfr" test
Merge branch 'stepan/ixfr-asyncserver' into 'main'

See merge request isc-projects/bind9!11403
2026-01-14 12:21:31 +00:00
Štěpán Balážik
46ecbbed0a Use isctest.asyncserver in the "ixfr" system test
Replace the usage of the `bin/tests/system/ans.pl` server with an
instance of ControllableAsyncServer.
2026-01-14 12:29:59 +01:00
Štěpán Balážik
2302fe1235 Add SwitchControlCommand for ControllableAsyncServer
To provide feature parity with `bin/tests/system/ans.pl` add a control
command to allow easy switching between different sequences of
ResponseHandlers.
2026-01-14 12:29:59 +01:00
Štěpán Balážik
7e587201a4 Use variadic positional parameters for plural install_* methods
It saves an indent and brackets on the call sites.

Also sort the handlers alphabetically where their order doesn't matter
and split the fallback handlers into a separate call to signify that
their position in the end matters.
2026-01-14 12:29:59 +01:00
Arаm Sаrgsyаn
96160298bd fix: usr: Make catalog zone names and member zones' entry names case-insensitive
Previously, the catalog zone names and their member zones' entry
names were unintentionally case-sensitive. This has been fixed.

Closes #5693

Merge branch '5693-catz-case-sensitivity-fix' into 'main'

See merge request isc-projects/bind9!11410
2026-01-12 12:59:35 +00:00