Commit Graph

37936 Commits

Author SHA1 Message Date
Michal Nowak
add15bd083 Remove remnants of Windows support in system test
The "uname -o" command is harmful on OpenBSD because this platform does
not know about the "-o" option. It is a permanent failure since system
tests are started with "set -e".

(cherry picked from commit ad3efede4d)
2023-07-18 17:45:35 +02:00
Tom Krizek
5cd6d2e70b Merge branch 'tkrizek/readthedocs-config-9.18' into 'bind-9.18'
[9.18] Add configuration for readthedocs.org

See merge request isc-projects/bind9!8109
2023-07-18 14:59:51 +00:00
Tom Krizek
5512e8fd6b Synchronize Sphinx package version on ReadTheDocs with our CI
Related: isc-projects/images!228
2023-07-18 16:17:36 +02:00
Tom Krizek
ab336d5da8 Add configuration for readthedocs.org
readthedocs.org is switching to in-repo configuration file in favor of
the deprecated web interface as it allows more flexibility.

This also fixes our recent doc build issues, as we're switching to a
newer Python which is required by Sphinx.

See https://blog.readthedocs.com/migrate-configuration-v2/

(cherry picked from commit a1a0ccda6e)
2023-07-18 15:33:07 +02:00
Tom Krizek
da44dff5ef Merge branch 'tkrizek/run-tests-with-set-e-9.18' into 'bind-9.18'
[9.18] Run system tests with set -e

See merge request isc-projects/bind9!8103
2023-07-17 15:03:26 +00:00
Tom Krizek
915e633a5d Handle curl without HTTP/2 support in doth test 2023-07-17 16:28:49 +02:00
Tom Krizek
854b50db32 Check return codes from commands in inline test
To improve the compatibility of the inline test with the `set -e`
option, ensure all commands which are expected to pass are explicitly
checked for return code and non-zero return codes are handled.

(cherry picked from commit e5f2addcaa)
2023-07-17 15:37:18 +02:00
Tom Krizek
e94162457c Ignore test cleanup commits in git blame
(manually picked from commit ccc9b87f59)
2023-07-17 15:36:45 +02:00
Tom Krizek
bca32c0c30 Handle non-zero return codes in autosign test 2023-07-17 15:30:14 +02:00
Tom Krizek
59e5fa4217 Use $(...) notation for subshells in system tests
The changes were mostly done with sed:

find . -name '*.sh' | xargs sed -i 's/`\([^`]*\)`/$(\1)/g'

There have been a few manual changes where the regex wasn't sufficient
(e.g. backslashes inside the `...`) or wrong (`...` referring to docs or
in comments).

(manually picked from commit 05baf7206b)
2023-07-17 15:30:14 +02:00
Tom Krizek
02edc985cf Handle non-zero return codes in rootkeysentinel tests
(cherry picked from commit d203681a75)
2023-07-17 15:30:14 +02:00
Tom Krizek
17f6a849ab Handle non-zero return codes in resolver test
(cherry picked from commit 2b8e5e1155)
2023-07-17 15:30:14 +02:00
Tom Krizek
28e39b567c Handle non-zero return codes in statschannel test
(cherry picked from commit cde02fdb6a)
2023-07-17 15:30:13 +02:00
Tom Krizek
db589ad1e5 Handle non-zero return codes in checkconf test
(cherry picked from commit 4a87b44196)
2023-07-17 15:30:13 +02:00
Tom Krizek
c1de0c9788 Handle non-zero return codes in dnstap test
(cherry picked from commit 9d383dce40)
2023-07-17 15:30:13 +02:00
Tom Krizek
e302ee1cc7 Handle non-zero return codes in kasp test
(cherry picked from commit ede8ea889b)
2023-07-17 15:30:13 +02:00
Tom Krizek
b7ef365cff Handle non-zero return codes in serve-stale test
(cherry picked from commit 4e8802a22d)
2023-07-17 15:30:13 +02:00
Tom Krizek
94a6fd2ad0 Handle non-zero return codes in doth test
(cherry picked from commit fae6808b9c)
2023-07-17 15:30:13 +02:00
Tom Krizek
523bbe906d Handle non-zero return codes in acl test
(cherry picked from commit 1e64749ed3)
2023-07-17 15:30:13 +02:00
Tom Krizek
716d8f43e0 Handle non-zero return codes in statistics test
(cherry picked from commit 3a36ff506d)
2023-07-17 15:30:13 +02:00
Tom Krizek
a460982af7 Handle non-zero return codes in rrsetorder test
(cherry picked from commit 9fdf537f52)
2023-07-17 15:30:13 +02:00
Tom Krizek
e7ec2cea48 Handle non-zero return codes in redirect test
(cherry picked from commit 45fc4cc465)
2023-07-17 15:30:12 +02:00
Tom Krizek
be033cf794 Handle non-zero return codes in rndc test
(cherry picked from commit c50a9e158d)
2023-07-17 15:30:12 +02:00
Tom Krizek
aca0cbe902 Handle non-zero return codes in inline test
(cherry picked from commit 36d74bd2e3)
2023-07-17 15:30:12 +02:00
Tom Krizek
c6fa52c31e Handle non-zero return codes unknown test
(cherry picked from commit f3310e1731)
2023-07-17 15:30:12 +02:00
Tom Krizek
245730cf78 Handle non-zero return codes in nsupdate test
(cherry picked from commit 86765ad1d3)
2023-07-17 15:30:12 +02:00
Tom Krizek
fcb72ad748 Handle non-zero return codes in zonechecks test
(cherry picked from commit e5933f65d6)
2023-07-17 15:30:12 +02:00
Tom Krizek
45c3163083 Handle non-zero return codes in wildcard test
(cherry picked from commit e8c61f8da4)
2023-07-17 15:30:12 +02:00
Tom Krizek
2ee1e36308 Handle non-zero return codes in zero test
(cherry picked from commit 69e8876966)
2023-07-17 15:30:12 +02:00
Tom Krizek
05247d365f Handle non-zero return codes in legacy test
(cherry picked from commit 3ce200ead8)
2023-07-17 15:30:11 +02:00
Tom Krizek
32ccdddcda Handle non-zero return codes in forward test
(cherry picked from commit 2823d0b469)
2023-07-17 15:30:11 +02:00
Tom Krizek
09cc0a03f5 Handle non-zero return codes in upforwd test
(cherry picked from commit 855f5b143a)
2023-07-17 15:30:11 +02:00
Tom Krizek
ffa70cad1a Handle non-zero return codes in addzone test
(cherry picked from commit 146cb978c5)
2023-07-17 15:30:11 +02:00
Tom Krizek
d34f1aac27 Handle non-zero return codes in rpzrecurse test
(cherry picked from commit 247b608f62)
2023-07-17 15:30:11 +02:00
Tom Krizek
881e4af8ed Handle non-zero return codes in rpz test
(cherry picked from commit 1d5caafa9e)
2023-07-17 15:30:11 +02:00
Tom Krizek
b04181224f Make $? compatible with set -e in system tests
Ensure handling of return code from previous command doesn't cause the
script to halt if that code is non-zero when running with `set -e`.

(cherry picked from commit 837c190d9e)
2023-07-17 15:30:11 +02:00
Tom Krizek
e577b1eca7 Use arithmetic expansion in system tests (followup)
These are manual edits in addition of the automated changes from the
previous commit.

(manually picked from commit 1436025e20)
2023-07-17 15:30:09 +02:00
Tom Krizek
6f07ba6b7d Use arithmetic expansion in system tests
Change the way arithmetic operations are performed in system test shell
scripts from using `expr` to `$(())`. This ensures that updating the
variable won't end up with a non-zero exit code, which would case the
script to exit prematurely when `set -e` is in effect.

The following replacements were performed using sed in all text files
(git grep -Il '' | xargs sed -i):

s/status=`expr $status + $ret`/status=$((status + ret))/g
s/n=`expr $n + 1`/n=$((n + 1))/g
s/t=`expr $t + 1`/t=$((t + 1))/g
s/status=`expr $status + 1`/status=$((status + 1))/g
s/try=`expr $try + 1`/try=$((try + 1))/g

(manually picked from commit 4d42bdc245)
2023-07-17 14:12:59 +02:00
Tom Krizek
d715bae429 Run system tests with set -e
Ensure all shell system tests are executed with the errexit option set.
This prevents unchecked return codes from commands in the test from
interfering with the tests, since any failures need to be handled
explicitly.

(cherry picked from commit 01bc805f89)
2023-07-17 13:46:19 +02:00
Michal Nowak
7abd0723fc Merge branch 'mnowak/detect-core-dumps-after-server-failed-to-stop-9.18' into 'bind-9.18'
[9.18] Detect core dumps after BIND failed to stop cleanly

See merge request isc-projects/bind9!8100
2023-07-13 13:52:34 +00:00
Michal Nowak
577f0723e0 Detect core dumps after BIND failed to stop cleanly
With the pytest runner, when BIND crashed during test runtime, the
get_core_dumps.sh script hasn't been run, and core dumps were not
detected.

(cherry picked from commit 89c77daddb)
2023-07-13 15:14:47 +02:00
Tom Krizek
80d4b602a7 Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.18.18' into 'bind-9.18'
Set up version and release notes for BIND 9.18.18

See merge request isc-projects/bind9!8093
2023-07-10 13:45:28 +00:00
Tom Krizek
e472710cac Set up release notes for BIND 9.18.18 2023-07-10 15:39:38 +02:00
Tom Krizek
77271086a2 Update BIND version to 9.18.18-dev 2023-07-10 15:39:37 +02:00
Arаm Sаrgsyаn
7428653012 Merge branch '4171-add-shutdown-check-in-dns_catz_dbupdate_callback-9.18' into 'bind-9.18'
[9.18] Add shutdown checks in dns_catz_dbupdate_callback()

See merge request isc-projects/bind9!8089
2023-07-06 12:32:11 +00:00
Aram Sargsyan
d753174392 Add a CHANGES note for [GL #4171]
(cherry picked from commit 8887da60ad)
2023-07-06 11:27:50 +00:00
Aram Sargsyan
4fdb57a1f3 Add shutdown checks in dns_catz_dbupdate_callback()
When a zone database update callback is called, the 'catzs' object,
extracted from the callback argument, might be already shutting down,
in which case the 'catzs->zones' can be NULL and cause an assertion
failure when calling isc_ht_find().

Add an early return from the callback if 'catzs->shuttingdown' is true.

Also check the validity of 'catzs->zones' after locking 'catzs' in
case there is a race with dns_catz_shutdown_catzs() running in another
thread.

(cherry picked from commit 28bb419edc)
2023-07-06 11:27:45 +00:00
Arаm Sаrgsyаn
e1529a6a01 Merge branch '4132-catz-data-race-in-db.c-9.18' into 'bind-9.18'
[9.18] Fix a data race between the dns_zone and dns_catz modules

See merge request isc-projects/bind9!8036
2023-07-06 11:25:37 +00:00
Ondřej Surý
26bb402b44 Run RPZ and catalog zones tasks in exclusive mode
All the heavy RPZ and CATZ work is already running with offloaded
threads, and running the remaining small functions in exclusive mode
offers more synchronization guaranties.

Move the update notify registration code from the offloaded
dns__catz_update_cb() function into dns__catz_done_cb().

After this change, it should be safe to remove the lock/unlock code
from the dns_catz_dbupdate_register() and dns_catz_dbupdate_unregister()
functions, as they were causing a benign TSAN lock-order-inversion
report.
2023-07-06 10:44:03 +00:00
Aram Sargsyan
471a2c0dd5 Add a CHANGES note for [GL #4132]
(cherry picked from commit f73007afe7)
2023-07-06 10:44:03 +00:00