Commit Graph

39925 Commits

Author SHA1 Message Date
Aram Sargsyan
35fc773632 dns_transport: use const arguments in getters when possible
In some dns_transport getter functions it's possible to use a
const dns_transport_t as the first argument instead of just
dns_transport_t. Convert the function prototypes to use const.
2023-09-22 08:51:45 +00:00
Ondřej Surý
baacd2af44 Merge branch '4327-minor-warning-about-ctype-h-function' into 'main'
Add semantic patch to explicitly cast chars to unsigned for ctype.h

Closes #4327

See merge request isc-projects/bind9!8325
2023-09-22 06:30:06 +00:00
Ondřej Surý
0e49a8422f Add CHANGES note for [GL #4327] 2023-09-22 08:29:17 +02:00
Ondřej Surý
29caa6d1f0 Explicitly cast chars to unsigned chars for <ctype.h> functions
Apply the semantic patch to catch all the places where we pass 'char' to
the <ctype.h> family of functions (isalpha() and friends, toupper(),
tolower()).
2023-09-22 08:29:17 +02:00
Ondřej Surý
5ec65ab5d0 Add semantic patch to explicitly cast chars to unsigned for ctype.h
Add a semantic patch to catch all the places where we pass 'char' to the
<ctype.h> family of functions (isalpha() and friends, toupper(),
tolower()).  While it generally works because the way how these
functions are constructed in the libc, it's safer to do the explicit
cast.
2023-09-22 08:29:17 +02:00
Michał Kępień
a0ab9c6c9e Merge branch 'mnowak/add-cve-ref-role' into 'main'
Add a Sphinx role for linking CVEs to the ISC Knowledgebase

See merge request isc-projects/bind9!8260
2023-09-21 12:22:49 +00:00
Michal Nowak
41b857e567 Add a Sphinx role for linking CVEs to the ISC Knowledgebase
The new :cve: Sphinx role takes a CVE number as an argument and creates
a hyperlink to the relevant ISC Knowledgebase document that might have
more up-to-date or verbose information than the relevant release note.
This makes reaching ISC Knowledgebase pages directly from the release
notes easier.

Make all CVE references in the release notes use the new Sphinx role.
2023-09-21 14:18:02 +02:00
Michał Kępień
c201835719 Merge branch 'michal/update-sphinx-and-sphinx_rtd_theme' into 'main'
Update Sphinx and sphinx_rtd_theme

See merge request isc-projects/bind9!8322
2023-09-20 15:20:25 +00:00
Michał Kępień
2f879cdec3 Update Sphinx and sphinx_rtd_theme
Update Sphinx-related Python packages to their current versions pulled
in by "pip install sphinx-rtd-theme" run in a fresh virtual environment.
2023-09-20 17:18:24 +02:00
Michał Kępień
fc0ee66063 Merge tag 'v9.19.17' 2023-09-20 16:45:47 +02:00
Ondřej Surý
37a8cf7dae Merge branch 'ondrej/remove-isc_hash_function' into 'main'
Use incremental hashing in the isc_sockaddr_hash() function

See merge request isc-projects/bind9!8298
2023-09-19 18:48:56 +00:00
Ondřej Surý
4cf4cc484d Use the new isc_sockaddr_hash_ex() to fix QID table hashing
The QID table hashing used a custom merging of the sockaddr, port and id
into a single hashvalue.  Normalize the QID table hashing function to
use isc_hash32 API for all the values.
2023-09-19 19:56:33 +02:00
Ondřej Surý
3230c8e369 Add isc_sockaddr_hash_ex that can be used in incremental hashing
Add a sockaddr hashing function that can be used as part of incremental
hashing.
2023-09-19 19:56:33 +02:00
Ondřej Surý
9f40eee0a8 Remove isc_hash_function macro
The last two users of 64-bit isc_hash_function() macro were removed in
the previous commits, remove the macro as well.
2023-09-19 19:56:33 +02:00
Ondřej Surý
1653fa61c7 Use 32-bit hashing in isc memory debugging
Switch from 64-bit isc_hash_function() to 32-bit isc_hash32() as we were
using the 32-bit value only anyway.
2023-09-19 19:51:51 +02:00
Ondřej Surý
9d326aaba3 Use incremental hashing in the isc_sockaddr_hash() function
Instead of copying address back and forth when hashing addr+port, we can
use incremental hashing.  Additionally, switch from 64-bit
isc_hash_function to 32-bit isc_hash32() as the resulting value is
32-bit.
2023-09-19 19:51:51 +02:00
Ondřej Surý
17b08fa614 Merge branch '4311-remove-sockaddr_unix' into 'main'
Completely remove the Unix Domain Socket support from BIND 9

Closes #4311

See merge request isc-projects/bind9!8292
2023-09-19 17:29:53 +00:00
Ondřej Surý
da4ba38c81 Add CHANGES and release note for [GL #4311] 2023-09-19 18:51:51 +02:00
Ondřej Surý
26685ce5a8 Remove Raw and FDWatch type of socket statistics
The isc_sockstatscounter_raw* and isc_sockstatscounter_fdwatch was just
a dead code and those counters were not used anywhere.  Remove them.
2023-09-19 18:51:35 +02:00
Ondřej Surý
7aebbec653 Completely remove the Unix Domain Socket support from BIND 9
The Unix Domain Sockets support in BIND 9 has been completely disabled
since BIND 9.18 and it has been a fatal error since then.  Cleanup the
code and the documentation that suggest that Unix Domain Sockets are
supported.
2023-09-19 18:51:35 +02:00
Tom Krizek
652f2725a0 Merge branch '4312-pytest-symlink-name-collision' into 'main'
Rename convenience symlink to pytest artifacts

Closes #4312

See merge request isc-projects/bind9!8306
2023-09-19 15:59:03 +00:00
Tom Krizek
fd13dfb097 Rename convenience symlink to pytest artifacts
The previous symlink name convention was prone to name collisions If a
system test contained both a shell test and a pytest module of the same
name (e.g. dnstap test has both tests.sh and tests_dnstap.py), then
these would have the same convenience symlink, which could cause test
setup issues as well as confusion when examining test artifacts.

Update the naming convention to include the full pytest module name.
This results in a slightly more verbose names for shell tests (e.g.
dnstap_sh_dnstap instead of the previous dnstap_dnstap), but it removes
the chance of a collision.
2023-09-19 17:20:32 +02:00
Tom Krizek
f441e68bb3 Merge branch '4250-remove-legacy-runner-support-for-python-tests' into 'main'
remove support for running python system tests with legacy test runner

Closes #4250

See merge request isc-projects/bind9!8202
2023-09-19 15:09:08 +00:00
Tom Krizek
d050843a30 Update system test runner doc with pytest glue files
Document that pytest requires a glue file for each shell tests in order
to detect it.
2023-09-19 15:45:53 +02:00
Tom Krizek
363677bde7 Add CHANGES note for [GL #4250] 2023-09-19 15:45:49 +02:00
Tom Krizek
8deb026748 Use integers for ports fixtures in pytest
Reorganize individual port fixtures and re-use the ports fixture to
obtain their number. Store it as integer and only cast it to string when
setting it as environment variable.
2023-09-19 15:43:33 +02:00
Tom Krizek
197dac55a2 Reformat conftest.py with black 2023-09-19 15:43:33 +02:00
Tom Krizek
d16e5fd5e5 Remove legacy runner support from conftest.py
Remove code fork for legacy runner, reorganize imports and move a
pylint-silencing snippet to the top of the file. The rest of the code
was just unindented.
2023-09-19 15:43:33 +02:00
Tom Krizek
4af9bafb4e Remove pytest invocation from legacy runner
In order to python system tests, pytest (runner) has to be used
directly. This makes it possible to simplify the pytest runner and make
its behavior simpler and easier to extend.

The legacy runner can still be used to run shell system tests.
2023-09-19 15:43:31 +02:00
Tom Krizek
94856ade3c Merge branch '4262-make-check-pytest' into 'main'
Use pytest runner for make check

Closes #4262

See merge request isc-projects/bind9!8286
2023-09-19 13:41:16 +00:00
Tom Krizek
0a9ee342e9 Remove make check invocation from legacy.run.sh
The legacy runner no longer uses make check. Ensure the legacy runner
script doesn't interact with that automake target in any way. The legacy
runner script remains available to execute the legacy runner, but there
is no out-of-the box support for running tests in parallel. Other tools
such as xargs can be utilized for that.
2023-09-19 14:47:49 +02:00
Tom Krizek
f1c631f448 ci: switch OpenBSD job to use make check
Invoking pytest directly provides a better formatted output and more
flexibility. However, it's prudent to verify that `make check` keeps
working as expected. Use it in the OpenBSD job which isn't executed as
frequently and its output is of least concern.
2023-09-19 14:47:49 +02:00
Tom Krizek
295890a16b Modify custom-test-driver to interpret JUnit results
Pytest provides JUnit output and uses different exit codes from
Automake. Use the conversion script to interpret the JUnit test results
from python rather than relying on the status code.
2023-09-19 14:47:49 +02:00
Tom Krizek
b96c8e8062 Convert JUnit XML from pytest into Automake .trs files
It's important to parse the JUnit result file rather than relying on the
exit code from pytest, which has a different meaning. Include a .trs test
result for each test case and set an exit code which is most appropriate
as the aggregate result (e.g. it will be set to 77 (SKIP) if there's at
least one test case that was skipped).
2023-09-19 14:47:49 +02:00
Tom Krizek
15fa8f1506 Prioritize long-running system tests for legacy runner
Synchronize the test priority with the pytest runner (which handles the
prioritization in conftest.py).
2023-09-19 14:47:48 +02:00
Tom Krizek
0538b7e0da Use prereq.sh for rpzrecurse system test 2023-09-19 14:47:48 +02:00
Tom Krizek
c3abedc0a2 Use prereq.sh for serve-stale system test 2023-09-19 14:47:48 +02:00
Tom Krizek
5d9a09c086 Use prereq.sh for chain system test 2023-09-19 14:47:48 +02:00
Tom Krizek
00b92bd064 Use prereq.sh for digdelv, dnssec, forward system tests 2023-09-19 14:47:48 +02:00
Tom Krizek
78981cee77 Use prereq.sh for qmin, cookie system tests 2023-09-19 14:47:48 +02:00
Tom Krizek
2f962f7041 Use prereq.sh for reclimit system test 2023-09-19 14:47:48 +02:00
Tom Krizek
587129b4c0 Use prereq.sh for xfer system test 2023-09-19 14:47:48 +02:00
Tom Krizek
27281955af Use prereq.sh for statschannel system test 2023-09-19 14:47:48 +02:00
Tom Krizek
9cc821d42f Add prereq.sh scripts for system tests requiring perl mod DNS
prereq.sh mechanism for dependency detection is preferred since it works
for both legacy and pytest runner.
2023-09-19 14:47:47 +02:00
Tom Krizek
f0493890cc Use proper perl interpreter in xfer system test 2023-09-19 14:47:47 +02:00
Tom Krizek
807f67b1cd Remove redundant dependency checks for system tests
Dependencies for these tests are already checked in prereq.sh - if the
dependencies are missing, these tests will be skipped. The extra
dependency check in Makefile.am is extraneous and only applied for the
legacy test runner.
2023-09-19 14:47:47 +02:00
Tom Krizek
d4502206a1 Fix pytest module detection for run.sh
To allow concurrent invocations of pytest, it is necessary to assign
ports properly to avoid conflicts. In order to do that, pytest needs to
know a complete list of all test modules.

When pytest is invoked from run.sh, the current working directory is the
system test directory. To properly detect other tests, the conftest.py
has to look in the bin/tests/system directory, rather than the current
working directory.
2023-09-19 14:47:47 +02:00
Tom Krizek
56c1087304 Use pytest runner for make check
Make python & pytest required dependencies to run system tests and
invoke the pytest runner from the makefile.
2023-09-19 14:47:45 +02:00
Tom Krizek
9a1a10e84f Merge branch 'tkrizek/pytest-check-system-test-files-with-danger' into 'main'
enforce system test file and name conventions with danger CI

See merge request isc-projects/bind9!8254
2023-09-19 12:46:54 +00:00
Tom Krizek
d1371267c6 danger: check system test convetions for pytest runner
When adding a new system test, it might easy to forget to add the
required files for the pytest runner or break a naming convention. Add
danger checks to cover these cases.
2023-09-19 13:29:30 +02:00