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

43778 Commits

Author SHA1 Message Date
Aydın Mercan
0afa06f807 fix: nil: do not install manpages for unbuilt binaries
See #5379

Merge branch 'aydin/git-tree-man-fix' into 'main'

See merge request isc-projects/bind9!10627
2025-06-30 12:36:24 +03:00
Aydın Mercan
206d52b727
do not install manpages for unbuilt binaries
Building and installing from a git release installed all manpages
unconditionally even if binaries like dnstap-read were disabled and not
built.

Now the manpage configuration checks for such cases and also cleans up
remaining artifacts and unnecessary pages if the build directory is
reconfigured.
2025-06-30 11:58:13 +03:00
Aydın Mercan
4e7ed1c051
do not install sphinx-build manpages in templated ones exist
When building from the tarball, meson would try to install both
sphinx-built and template configured manpages.

While harmless for now, it might cause issues for future meson version.
2025-06-30 10:40:53 +03:00
Ondřej Surý
97bb7eb4df chg: dev: Change isc_tid to be isc_tid_t type (a signed integer type)
Change the internal type used for isc_tid unit to isc_tid_t to hide the
specific integer type being used for the 'tid'.  Internally, the isc_tid
unit is now using signed integer type.  This allows us to have negatively
indexed arrays that works both for threads with assigned tid and the
threads with unassigned tid.  Additionally, limit the number of threads
(loops) to 512 (compile time default).

Merge branch 'ondrej/tidy-up-isc-tid' into 'main'

See merge request isc-projects/bind9!10656
2025-06-28 14:06:05 +02:00
Ondřej Surý
dd37fd6a49 Add ISC_TID_MAX with default being 512 threads
The ISC_TID_MAX variable allows other units to declare static arrays
with this as size for per-thread/per-loop variables.
2025-06-28 13:32:12 +02:00
Ondřej Surý
1032681af0 Convert the isc/tid.h to use own signed integer isc_tid_t type
Change the internal type used for isc_tid unit to isc_tid_t to hide the
specific integer type being used for the 'tid'.  Internally, the signed
integer type is being used.  This allows us to have negatively indexed
arrays that works both for threads with assigned tid and the threads
with unassigned tid.  This should be used only in specific situations.
2025-06-28 13:32:12 +02:00
Štěpán Balážik
2c58fe486b fix: nil: Only run ci-orphaned-anchors on MR events
Now, it is also run in schedules and most annoyingly on push which means
that it is run twice on a push to a branch where a MR exists and `.gitlab-ci.yml` is changed.

This was an oversight in https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/10654

Merge branch 'stepan/remove-additional-pipeline' into 'main'

See merge request isc-projects/bind9!10668
2025-06-28 10:51:59 +00:00
Štěpán Balážik
7ca18df58a Only run ci-orphaned-anchors on MR events
Now, it is also run in schedules and most annoyingly on push which means
that it is run twice on a push to a branch where a MR exists.
2025-06-27 20:27:14 +02:00
Štěpán Balážik
f7601106bd new: ci: Add a check for defined but never used anchors in .gitlab-ci.yaml
If an new orphan anchor is (`.anchor: &anchor` with no corresponding `*anchor` elsewhere in the file) is introduced the CI job will.

Depends on https://gitlab.isc.org/isc-projects/bind9-qa/-/merge_requests/101 (merge that first and then drop the `--branch` commit).

Merge branch 'stepan/ci-orphaned-anchors' into 'main'

See merge request isc-projects/bind9!10654
2025-06-27 16:41:06 +00:00
Štěpán Balážik
919f5d6419 Remove orphaned anchors in .gitlab-ci.yml
These were left there after previous refactors.
2025-06-27 16:04:22 +00:00
Štěpán Balážik
5ed2b6c080 Add a check for defined but never used anchors in .gitlab-ci.yaml
If a anchor is ever orphaned, this will fail in CI.
2025-06-27 16:04:22 +00:00
Štěpán Balážik
9331451c5f Don't redifine stage:precheck in ci-variables job definition
The value is defined in the *precheck_job anchor.
2025-06-27 16:04:22 +00:00
Štěpán Balážik
8a26cb406c fix: nil: Move root zone mirror system test to a separate directory
This test doesn't require artifact checking but when bundled in the same
directory with the shell based tests, the `system:clang:tsan` job was
failing non-deterministically.

An example of the job failing and succeeding on the same commit:
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/5809299
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/5809447

Merge branch 'stepan/move-root-zone-mirror-test-to-a-separate-directory' into 'main'

See merge request isc-projects/bind9!10659
2025-06-27 15:20:29 +00:00
Štěpán Balážik
d5874d5df9 Move root zone mirror system test to a separate directory
This test doesn't require artifact checking but when bundled in the same
directory with the shell based tests, the `system:clang:tsan` job was
failing non-deterministically.
2025-06-27 15:19:45 +00:00
Nicki Křížek
7bd3547c98 chg: test: Improve pytest log output
- increase clarity of multiline messages
- support `isc.query.*()` query&response logging
- replace use of `print()` statement with proper logging
- omit empty lines from test result output

Merge branch 'nicki/improve-pytest-logging' into 'main'

See merge request isc-projects/bind9!10590
2025-06-27 17:03:54 +02:00
Nicki Křížek
fcf31417dd Log assertion failures right after test result
The extra messages are typically traceback from assertion failures.
Previously, they'd be printed only after all individual test case
results have been printed. That made it difficult to pair the traceback
to the failing test in some cases, as the node information (aka test
name) might not always be present.

Instead, log any extra messages related to a particular test failure
directly after reporting its result, making the failure details more
readily available and easy to connect with a particular test case.
2025-06-27 16:31:49 +02:00
Nicki Křížek
9f3f6ec38e Log command stdout when using isctest.run.cmd()
The command's stdout may provide useful debug info, so make sure we log
it by default. It doesn't seem to have a significant impact on the log
size.
2025-06-27 16:31:49 +02:00
Nicki Křížek
56fec9ba04 Log query and response when using isctest.query.*
Make sure the queries and responses are logged at the DEBUG level, which
may provide useful information in case of failing tests.

This doesn't seem to significantly increase the overall artifacts size.
Previously, pytest.log.txt files from all system tests would take around
3 MB, with this change, it's around 8 MB).
2025-06-27 16:31:49 +02:00
Nicki Křížek
51ac5bdd14 Use proper logging in SPNEGO tests
Avoid using print() and use proper logging facility instead.
2025-06-27 16:31:49 +02:00
Nicki Křížek
1e87b5ffc6 Add options for query&response logging to pytest
In some cases, it's useful to log the sent and received DNS messages.
Add options to enable this on demand. Query is only logged the first
time it's sent, since it doesn't change. If response logging is turned
on, then each response is logged, since it might be different every
time.
2025-06-27 16:31:49 +02:00
Nicki Křížek
23e6b49cc5 Indent multiline output in pytest logging
When multiline message is logged, indent all but the first line (which
will be preceeded by the LOG_FORMAT). This improves the clarity of logs,
as it's immediately clear which lines are regular log output, and which
ones are multiline debug output.

Adjust the isctest.run.cmd() stdout/stderr logging to this new format.
2025-06-27 16:31:49 +02:00
Nicki Křížek
0a6b0cf68c Don't log empty test result messages
The messages obtained from test results may contain stuff like detailed
failure/error information, tracebacks etc. In many cases, the message
will be empty, in which case it doesn't need to be logged.

For an example, run test with many test cases, e.g.
verify/test_verify.py, and inspect the tail of the pytest.log.txt before
and after this commit.
2025-06-27 16:31:49 +02:00
Nicki Křížek
4b8998e4ad Replace print statements in checkds test
Use isctest.log logging facility for consistent and predictable logging
output rather than using print(). Remove writes of stderr, as that
output will be logged in the debug log in case the commands called with
isctest.run.cmd() fails.
2025-06-27 16:31:49 +02:00
Štěpán Balážik
2cc1e8d0b0 new: test: Add a system test that ensures root zone mirroring works out of the box
This is a test for #5380.

Merge branch 'stepan/mirror-root-zone-from-the-internet' into 'main'

See merge request isc-projects/bind9!10596
2025-06-27 12:10:11 +00:00
Štěpán Balážik
a69efc678c Add a system test that ensures root zone mirroring works out of the box
This is a test for #5380.
2025-06-27 13:05:43 +02:00
Štěpán Balážik
3a8ffc74df Add a pytest mark for system tests that require Internet connection
We skip those by default as:

a) we don't want to stress the upstream servers in every CI pipeline
b) system tests need to be runnable in a isolated environment by default
2025-06-27 07:24:48 +00:00
Štěpán Balážik
c7a8f61055 Rename CI_ENABLE_ALL_TESTS to CI_ENABLE_LONG_TESTS
New name is more descriptive and allows us to created more optional
test sets.
2025-06-27 07:24:48 +00:00
Štěpán Balážik
fd2c3f0e81 rem: nil: Remove scripts related to the automake test driver
These were left in in the Meson migration.

Merge branch 'stepan/clean-up-test-driver-residue' into 'main'

See merge request isc-projects/bind9!10648
2025-06-26 13:25:31 +00:00
Štěpán Balážik
a62fdee97f Remove scripts related to the automake test driver
These were left in in the Meson migration.
2025-06-26 13:24:33 +00:00
Petr Špaček
e28714ac67 fix: ci: Simplify maintenance of NO_BUILD_TEST_PREREQ CI hack
Merge branch 'pspacek/fix-ci-meson-170-unit-tests' into 'main'

See merge request isc-projects/bind9!10644
2025-06-26 12:50:31 +00:00
Petr Špaček
052269a357 Simplify maintenance of NO_BUILD_TEST_PREREQ CI hack
Our split between build and test phases in CI triggers odd corner case
in Meson:
- Newer Meson versions (1.7.0+) do not build test targets as part of
  "all" target.
- We copy build artifacts from build phase into test container.
- meson test --no-rebuild does not build test artifacts even if they are
  missing.
- To build these test binaries Meson has special target
  "meson-test-prereq". This target exists only in Meson >= 0.63.
- Ubuntu 22.04 has only Meson 0.61.2 so this target does not exist.

To counter this problem, we introduced BUILD_TEST_PREREQ variable in CI
to explicitly build "meson-test-prereq" target in the "build" phase only
inside images with new-enough Meson versions. This worked, but it forced
us to keep track of Meson versions on various
distros and update the variable accordingly.

This commit inverts the logic so we build the special target by default
(in the build phase) and skip building it only if Meson version is too
old. So once we drop the old image, the variable (or rather it's usage)
will be gone and we don't need to touch it for newer images.

We have also considered installing newer Meson into the test image, but
decided to keep the old version around so we can test minimal Meson
version specified in meson.build file.
2025-06-26 14:43:17 +02:00
Michal Nowak
ae67c70be7 chg: ci: Disable Kerberos in tumbleweed
In the tumbleweed image, we utilize LibreSSL. Several BIND 9 libraries
are linked against LibreSSL's libcrypto.so.55, and when Kerberos is
enabled, we link against libk5crypto.so.3, which in turn links against
OpenSSL's libcrypto.so.3. This might theoretically lead to a symbol
conflict.

Closes #5394

Merge branch '5394-disable-kerberos-in-tumbleweed' into 'main'

See merge request isc-projects/bind9!10643
2025-06-26 12:56:08 +02:00
Michal Nowak
1b2c191bed Disable Kerberos in tumbleweed
In the tumbleweed image, we utilize LibreSSL. Several BIND 9 libraries
are linked against LibreSSL's libcrypto.so.55, and when Kerberos is
enabled, we link against libk5crypto.so.3, which in turn links against
OpenSSL's libcrypto.so.3. This might theoretically lead to a symbol
conflict.
2025-06-26 12:54:45 +02:00
Michał Kępień
324b5786dc fix: nil: Fix version description in a startup log message
Commit 5cd6c173ff74309ae7fb73b3e4c754f1589eaddc changed the contents of
the PACKAGE_DESCRIPTION preprocessor macro from " (<description>)" to
just "<description>" and missed a spot while adjusting all uses of this
macro in the code base.  Fix formatting for that malformed log message,
emitted upon named startup.

See #5379

Merge branch '5379-fix-version-description-in-a-startup-log-message' into 'main'

See merge request isc-projects/bind9!10646
2025-06-26 12:06:35 +02:00
Michał Kępień
12829660fc
Fix version description in a startup log message
Commit 5cd6c173ff74309ae7fb73b3e4c754f1589eaddc changed the contents of
the PACKAGE_DESCRIPTION preprocessor macro from " (<description>)" to
just "<description>" and missed a spot while adjusting all uses of this
macro in the code base.  Fix formatting for that malformed log message,
emitted upon named startup.
2025-06-26 12:05:53 +02:00
Štěpán Balážik
4d76a92e6a fix: ci: Ensure that junit.xml is present and non-empty after each system/unit test job
Previously, JUnit files were not generated or were generated empty for various reasons for some system/unit test runs.

Now, the number of tests collected for a MR is up from about 4k to 5.8k in the "Tests" tab of a pipeline.

Additionally, there is a check that ensures that [a somewhat sane](c5a271eb8b) `junit.xml` file is generated after every system/unit test job and fails the job otherwise.

Closes #5316

Merge branch '5316-ensure-junit-xml' into 'main'

See merge request isc-projects/bind9!10556
2025-06-26 10:04:02 +00:00
Štěpán Balážik
4303e06919 Clean up the definitions and usages of &unit_test_* anchors
Remove redundant indirections and overwrites.
2025-06-26 11:17:30 +02:00
Štěpán Balážik
4ec1a37ca0 Hoist the junit and artifact handling to the &unit_test_common anchor
In some cases the report wasn't generated, sometimes it wasn't kept
properly. This unifies the way artifacts are generated and kept.
2025-06-26 11:17:30 +02:00
Štěpán Balážik
cbe9972d3e Clean up the definitions and usages of &system_test_* anchors
Remove redundant indirections and overwrites.
2025-06-25 17:40:05 +02:00
Štěpán Balážik
c61ff639b3 Hoist the artifact handling to the &system_test_common anchor
In the past artifacts of different types of system test jobs were
treated differently but this is no longer the case.
2025-06-25 17:36:29 +02:00
Štěpán Balážik
dfd6097f7b Add a check for existence and sanity of the junit.xml file
And use if after system tests are run using pytest.
2025-06-25 17:24:46 +02:00
Petr Špaček
117091c4fe fix: nil: Be more explicit about CVE checklist milestones
Merge branch 'pspacek/cve-checklist-more-explicit-milestones' into 'main'

See merge request isc-projects/bind9!10626
2025-06-25 15:00:32 +00:00
Petr Špaček
44b1ce6804 Be more explicit about CVE checklist milestones 2025-06-25 16:35:40 +02:00
Alessio Podda
01a49e8e47 chg: dev: Change QP and qpcache logging from DEBUG(1) to DEBUG(3)
Currently qp and qpcache logs are too verbose and enabled at a
level too low compared to how often the logging is useful.

This commit increases the logging level, while keeping it configurable
via a define.

Merge branch 'alessio/higher-level-qp-log' into 'main'

See merge request isc-projects/bind9!10604
2025-06-25 13:22:59 +00:00
Alessio Podda
ef95806e05 Change QP and qpcache logging from DEBUG(1) to DEBUG(3)
Per pspacek, currently qp and qpcache logs are too verbose and enabled at a
level too low compared to how often the logging is useful.

This commit increases the logging level, while keeping it configurable
via a define.
2025-06-25 14:37:01 +02:00
Michal Nowak
27f45d9f64 chg: doc: Make empty changelog fatal error
The prep_doc_mr.py script of the bind9-qa repo needs a way to know that
gitchangelog.py did not produce entries. In the case of release notes,
it dies with "No commits matching given revlist". For changelog entries
it used to warn about "Empty changelog", but did not return non-zero
exit code.

Merge branch 'mnowak/make-empty-changelog-fatal' into 'main'

See merge request isc-projects/bind9!10591
2025-06-25 14:06:36 +02:00
Michal Nowak
4d0ae4068f Make empty changelog fatal error
The prep_doc_mr.py script of the bind9-qa repo needs a way to know that
gitchangelog.py did not produce entries. In the case of release notes,
it dies with "No commits matching given revlist". For changelog entries
it used to warn about "Empty changelog", but did not return non-zero
exit code.
2025-06-25 14:06:05 +02:00
Petr Špaček
5b591c74dc fix: test: Do not rely on failure in default configuration
Merge branch 'main-systemtest-cpu-hang' into 'main'

See merge request isc-projects/bind9!10631
2025-06-25 11:35:53 +00:00
Petr Menšík
8e789ea62f Do not expect fail in cpu test default configuration
Previous CPU test relied on either missing default named.conf or the
missing permissions to write into its default directory. In short that
default configuration would be unusable with current user. It would hang
indefinitely at cpu test if the named user could write into directory
specified in default configuration.

Change it instead to explicitly try non-existent configuration file.
It will still fail immediately, but will not rely on running user or
presence of file at default configuration file path.
2025-06-25 11:35:27 +00:00
Michal Nowak
4fa74b4c8c chg: ci: Add meson support to util/release-tarball-comparison.sh
Related: #5379

Merge branch 'mnowak/fix-tarball-comparison-with-meson' into 'main'

See merge request isc-projects/bind9!10620
2025-06-25 12:53:25 +02:00