Commit Graph

38048 Commits

Author SHA1 Message Date
Matthijs Mekking
97c70e6b4e Add release note and CHANGES for #1181 2023-08-23 09:59:25 +02:00
Matthijs Mekking
a0a95fb997 Make nsupdate honor -v for SOA queries
nsupdate offers the switch -v to use TCP for update requests. But
before sending that update request nsupdate was using UDP connection
to gather the SOA for determining the zone if not given explicitly.

Only use TCP if not using the default servers, because the SOA
query lookup is a different server with different capabilities (and
usually not for the better of it).
2023-08-23 09:58:17 +02:00
Tom Krizek
c0e39f0272 Merge branch '4249-compile-test-files-during-make-9.18' into 'bind-9.18'
[9.18] Compile system test binaries during make

See merge request isc-projects/bind9!8226
2023-08-22 14:22:47 +00:00
Tom Krizek
468e05a181 ci: Disable dnsrps for respdiff jobs compiled with ASAN/TSAN
The dnsrps build assumes that dlopen is available from libc. This
assumption isn't met when attempting to build with address or thread
sanitizer on debian (bullseye, bookworm). Disable dnsrps build to avoid
the issue, since it's not needed anyway for our respdiff tests.

See commit b396f55586 for more info about
the dnsrps build.

(cherry picked from commit 0422415500)
2023-08-22 15:40:47 +02:00
Tom Krizek
ae18bc33c5 Compile system test binaries during make
Using check_PROGRAMS would postpone compiling the binaries needed by
system tests until `make check` would be called. Since it's preferable
to invoke pytest directly to run the system test suite, compile these
binaries without installing them during `make all` instead by using
noinst_PROGRAMS.

This removes the need to use TESTS= make -e check hack invoked from
pytest to work around this issue.

(cherry picked from commit 21980b43b8)
2023-08-22 15:40:44 +02:00
Ondřej Surý
fb95c1b8f4 Merge branch '4270-use-HAVE_STDATOMIC_H-for-stdatomic.h-header-detection-9.18' into 'bind-9.18'
Workaround faulty stdatomic.h header detection on Oracle Linux 7

See merge request isc-projects/bind9!8230
2023-08-22 13:29:43 +00:00
Ondřej Surý
701eb26f97 Workaround faulty stdatomic.h header detection on Oracle Linux 7
Oracle Linux 7 sets __STDC_VERSION__ to 201112L, but doesn't define
__STDC_NO_ATOMICS__, so we try to include <stdatomic.h> without the
header present in the system.  Since we are already detecting the header
in the autoconf, use the HAVE_STDATOMIC_H for more reliable detecting
whether <stdatomic.h> header is present.
2023-08-22 14:23:05 +02:00
Michal Nowak
9424f5a5b1 Merge branch 'mnowak/shutdown-test-drop-t-option' into 'bind-9.18'
Drop the rndc "-t" option from shudown system test

See merge request isc-projects/bind9!8227
2023-08-22 09:00:02 +00:00
Michal Nowak
8738309e24 Drop the rndc "-t" option from shudown system test
BIND 9.18 rndc does not know about the "-t" option, that results in an
silent "invalid argument" error.

The "-t" option originally came with
184eddb595 (a backport from the main
branch).
2023-08-22 10:58:58 +02:00
Michal Nowak
3ac53b39f2 Merge branch '4139-test_send_timeout-check-can-be-unstable-9.18' into 'bind-9.18'
[9.18] Make the test_send_timeout check more stable

See merge request isc-projects/bind9!8219
2023-08-22 08:07:07 +00:00
Michal Nowak
c3cc8aa429 Mark test_send_timeout as flaky
In some cases, BIND is not fast enough to fill the send buffer and
manages to answer all queries, contrary to what the test expects.
Repeat the check up to 3 times to limit this test instability.

(cherry picked from commit 681b23c398)
2023-08-22 08:55:03 +02:00
Tom Krizek
71a9e152f1 Add custom flaky decorator to handle unstable tests
If the flaky plugin for pytest is available, use its decorator to
support re-running unstable tests. In case the package is missing,
execute the test as usual without attempts to re-run it in case of
failure.

This is mostly intended to increase the test stability in CI. Using a
custom decorator enables us to keep the flaky package as an optional
dependency.

(cherry picked from commit 5b703de733)
2023-08-22 08:55:03 +02:00
Evan Hunt
812a37cf93 Merge branch '3835-cname-wildcard-loop-followup-bind-9.18' into 'bind-9.18'
[9.18] prevent query_coveringnsec() from running twice

See merge request isc-projects/bind9!8224
2023-08-21 22:22:36 +00:00
Evan Hunt
30bd750dd5 CHANGES for [GL #3835]
(cherry picked from commit ba1f75684f)
2023-08-21 14:31:37 -07:00
Evan Hunt
07f6c63a80 prevent query_coveringnsec() from running twice
when synthesizing a new CNAME, we now check whether the target
matches the query already being processed. if so, we do not
restart the query; this prevents a waste of resources.

(cherry picked from commit 0ae8b2e056)
2023-08-21 14:31:10 -07:00
Michal Nowak
d6ba9b3ed5 Merge branch '3893-make-debian-12-bookworm-base-image-9.18' into 'bind-9.18'
[9.18] Make Debian 12 "bookworm" the base image

See merge request isc-projects/bind9!8221
2023-08-21 18:03:30 +00:00
Michal Nowak
a5daf67a60 Move clang:bullseye PKCS11 testing to gcc:bullseye
Move clang:bullseye:amd64 PKCS11 testing to the gcc:bullseye:amd64 job
to evenly represent compilers in PKCS11 testing.

(cherry picked from commit 077d82403e)
2023-08-21 17:27:22 +02:00
Michal Nowak
ed09a82d18 Drop unnecessary gcovr workarounds
Many problems of the Debian 11 gcovr version were fixed in the Debian 12
one. Replace workarounds we accumulated over the years with two new,
simple ones.

(cherry picked from commit 55f5aa08f0)
2023-08-21 17:27:07 +02:00
Michal Nowak
405888dc8b Drop PKCS11 testing from "sid", resore it on "clang:bookworm"
The gcc:sid:amd64 job was used to test PKCS11 via the OpenSSL engine API
but is now designated for future PKCS11 testing via the provider API.

The ability to use PKCS11 via engine API in clang:bookworm:amd64 has
been restored using only deprecated APIs in OpenSSL 3.

(cherry picked from commit cfb06dabfe)
2023-08-21 17:26:48 +02:00
Michal Nowak
10458a419f Disable mandoc stylistic warning
We are not concerned by the "input text line longer than 80 bytes"
stylistic warning.

(cherry picked from commit 7929168295)
2023-08-21 17:26:27 +02:00
Michal Nowak
23a45b83f6 Drop unneeded -Wno-compound-token-split-by-macro option
Debian 12 has Perl 5.36 and the option is no longer needed.

(cherry picked from commit a330ab221e)
2023-08-21 17:26:03 +02:00
Michal Nowak
84911e693b Reintroduce Debian 11 "bullseye" Clang and GCC jobs
(cherry picked from commit 5e1120d9a3)
2023-08-21 17:25:41 +02:00
Michal Nowak
eebe045d46 Make Debian 12 "bookworm" the base image
Just replace "bullseye" with "bookworm" and reintroduce Debian 11
"bullseye" later.

(cherry picked from commit 2d18c57c54)
2023-08-21 17:24:30 +02:00
Tom Krizek
23099da568 Merge branch '4252-pytest-symlink-to-test-artifacts-9.18' into 'bind-9.18'
[9.18] Create symlinks to test artifacts for pytest runner

See merge request isc-projects/bind9!8218
2023-08-21 14:47:23 +00:00
Tom Krizek
b6e522ad03 .gitignore temporary directories and symlinks in system test dir
(cherry picked from commit 355dc73391)
2023-08-21 16:07:30 +02:00
Tom Krizek
303de3e089 Add clean-local target to clean pytest runner artifacts
The command finds all directories in bin/tests/system which contain an
underscore. Underscore indicates either a temporary directory (_tmp_), a
symlink to test artifacts (TESTNAME_MODULENAME), or a python-related
cache. Using underscore for a system test name is invalid and a hyphen
must be used instead.

(cherry picked from commit d66ff81543)
2023-08-21 16:07:30 +02:00
Tom Krizek
4b3d0c0f46 Silence pylint's refactoring suggestions for system_test_dir()
While it'd be fairly easy to split the function up into smaller ones,
the readability wouldn't be improved in this case. Silence the
suggestions instead.

(cherry picked from commit 83ddca7690)
2023-08-21 16:07:30 +02:00
Tom Krizek
4f6ea4fa1b Improve tempdir logging for pytest runner
At the end of the test, display the symlink path to the artifact
directory in case it's preserved. Log the full tempdir name in debug
log.

(cherry picked from commit f91d0b13e8)
2023-08-21 16:07:30 +02:00
Tom Krizek
89e6d1bc26 Create symlinks to test artifacts for pytest runner
While temporary directories are useful for test execution to keep
everything clean, they are difficult to work with manually. Create a
symlink for each test artifact directory with a stable and predictable
path. The symlink always either points to the latest artifacts, or is
missing in case the last run succeeded.

Ensure these symlinked directories aren't detected as test suites by the
pytest runner.

(cherry picked from commit e1ca5c8071)
2023-08-21 16:07:28 +02:00
Tom Krizek
22de8654a5 Merge branch '4246-remove-legacy-test-runner-from-ci-9.18' into 'bind-9.18'
[9.18] Use pytest runner for out-of-tree and OpenBSD system tests in CI

See merge request isc-projects/bind9!8217
2023-08-21 14:06:59 +00:00
Tom Krizek
57b2966d0b Improve pytest message when sanitizer report is found
(cherry picked from commit b1a9d1fe25)
2023-08-21 15:16:53 +02:00
Tom Krizek
8a4386f90c ci: run out-of-tree system tests with pytest runner
Out-of-tree builds are built in a directory that is different from
source directory. The build directory doesn't contain the non-compiled
test files from bin/tests/system which are the test cases required by
the pytest runner.

In order to run the system tests for out-of-tree build, copy over the
contents (tests) of bin/tests/system/ from the source directory into the
build directory. Then, it is possible to invoke the pytest runner inside
the build directory.

(cherry picked from commit d49d9ec80e)
2023-08-21 15:15:31 +02:00
Tom Krizek
30ddef53cb ci: use pytest system test runner on OpenBSD
A supported pytest version finally made it to OpenBSD repositories,
allowing us to run system tests with the pytest runner.

(cherry picked from commit 8846877dfe)
2023-08-21 15:15:29 +02:00
Michał Kępień
223fcb0fe2 Merge tag 'v9.18.18' into bind-9.18 2023-08-17 14:14:42 +02:00
Mark Andrews
7baabe5e10 Merge branch '4259-statschannel-leftovers-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Statschannel leftovers"

See merge request isc-projects/bind9!8200
2023-08-15 04:50:22 +00:00
Mark Andrews
86b9e02600 Remove bind9.xsl.1, bind9.xsl.2 and bind9.xsl.3
(cherry picked from commit 7da47fd858)
2023-08-15 14:25:11 +10:00
Mark Andrews
7c78ea9ebe Merge branch '4238-the-mkeys-system-test-can-update-the-root-zone-too-fast-bind-9.18' into 'bind-9.18'
[9.18] Resolve "The mkeys system test can update the root zone too fast"

See merge request isc-projects/bind9!8197
2023-08-15 00:16:17 +00:00
Mark Andrews
5097911f51 Add sleeps so that the modification time changes
The mkeys system test could fail because root zone was resigned
within the same second as it was previously signed causing reloads
to fail.  Add delays to the test to prevent this.

(cherry picked from commit 40e3529379)
2023-08-15 09:38:00 +10:00
Ondřej Surý
0e8cccec64 Merge branch '4124-check-statschannel-if-modified-since-9.18' into 'bind-9.18'
[9.18] Fix a stack buffer overflow in the statistics channel

See merge request isc-projects/bind9!8196
2023-08-14 12:57:26 +00:00
Ondřej Surý
c63c646019 Add CHANGES and release notes for [GL #4124]
(cherry picked from commit 57c8bdaff5)
2023-08-14 13:08:11 +02:00
Tony Finch
57069556eb Fix a stack buffer overflow in the statistics channel
A long timestamp in an If-Modified-Since header could overflow a
fixed-size buffer.

(cherry picked from commit b22c87ca61)
2023-08-14 13:07:47 +02:00
Mark Andrews
3160239998 Merge branch '4245-incorrect-return-values-in-rpz-s-addr-and-drop-function-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Incorrect return values in rpz's addr and drop functions"

See merge request isc-projects/bind9!8190
2023-08-10 00:05:27 +00:00
Mark Andrews
2dd9c3a5f3 Fix 'addr', 'ckresult' and 'drop' functions
'addr', 'ckresult' and 'drop' should return 0 rather than 1 after
calling 'setret' as the error has been logged and these functions
are not expect to fail.

(cherry picked from commit 1394f12a1c)
2023-08-10 09:37:11 +10:00
Michal Nowak
082d6ae965 Merge branch 'mnowak/cross-version-test-9.18' into 'bind-9.18'
[9.18] Cross-version testing with named configurations

See merge request isc-projects/bind9!8184
2023-08-08 18:08:23 +00:00
Michal Nowak
9ba5c120cf Cross-version testing with named configurations
In #3381 (and #3385), we committed a backward-incompatible change to
BIND 9.19.5, 9.18.7, and 9.16.33, explicitly requiring "inline-signing"
for every "dnssec-policy".

We did this backward-incompatible change deliberately, knowing the
consequences for users and their configurations. But if we didn't, say,
we were unaware this is a backward-incompatible change and fixed failing
systems test by "tweaking a knob to make the CI pass", we would not have
a second look before the change hits user configurations.

"cross-version-config-tests" CI job is such a second look. It will run
system tests from the latest release tag specific to the particular
branch (e.g., v9.19.12 for the "main" branch) with BIND 9 binaries from
the current "HEAD" (the future v9.19.13). This Frankenstein build gets
conceived by altering the "TOP_BUILDDIR" variable in
"bin/tests/system/conf.sh".

Caveats:
- Only system test configurations are tested; no actual test code is
  run.
- Problems with namedN.conf configurations are not identified.

When backward-incompatible change is introduced, the CI job is expected
to fail. If the change is deliberate, the job will keep failing until
the version with the backward-incompatible change is tagged, and the
minor version in configure.ac is bumped.

(cherry picked from commit cc54211baa)
2023-08-08 19:39:16 +02:00
Michal Nowak
6f01270de7 Merge branch 'mnowak/pytest_rewrite_stress-9.18' into 'bind-9.18'
[9.18] Rewrite stress test to pytest

See merge request isc-projects/bind9!8182
2023-08-08 13:08:29 +00:00
Michał Kępień
dbdc70cbe0 Convert setup.pl into static configurations
The setup.pl script has been replaced with static BIND configurations,
and in the course of this change, the unused ns1 server was removed.
This enhancement has greatly improved the overall test's readability.

(cherry picked from commit 08a8906cfc)
2023-08-08 14:30:34 +02:00
Michal Nowak
624c20b191 Rewrite stress test to pytest
The shell version of the test was completed only after all DNS zone
updates were sent, even if the BIND server crashed while processing
them, leading to prolonged execution and potential hang in the CI
environment. The Python rewrite of the test ensures that DNS update
tasks finish within five minutes of starting, irrespective of a BIND
crash possibility or DNS zone updates not finishing in time.

(cherry picked from commit ecd7b30d0a)
2023-08-08 14:30:27 +02:00
Michał Kępień
300f0230e1 Merge branch '4240-dnstap-system-test-fixes-9.18' into 'bind-9.18'
[9.18] "dnstap" system test fixes

See merge request isc-projects/bind9!8178
2023-08-07 12:59:41 +00:00
Michał Kępień
a1800c23a0 Wait until fstrm_capture is ready
The fstrm_capture utility is started in the background during the
"dnstap" system test.  Consequently, "rndc dnstap-reopen" and similar
commands may be executed before fstrm_capture starts listening on the
Unix domain socket it is configured to receive dnstap data on.  This
results in the dnstap data sent to that socket in the meantime to be
lost; while the fstrm writer thread is able to recover from such a
scenario within a couple of seconds (by reopening the configured dnstap
destination itself), only one write attempt is made for data
successfully queued to the writer thread, so dnstap frames can still be
lost in the process.  This may happen during the "dnstap" system test,
leading to the dnstap output file being empty, which in turn causes the
test to fail.

Fix by waiting until fstrm_capture starts listening on the Unix domain
socket it is configured to use before asking named to reopen the
configured dnstap destination.  Since various fstrm_capture versions log
different messages when the listening socket is set up, wait for a
common string that works for all fstrm_capture versions released to
date.  Add a few extra debug messages indicating test progress and make
the test fail if the expected fstrm_capture log message is not generated
within 10 seconds.

(cherry picked from commit 26d3d97f12)
2023-08-07 13:59:35 +02:00