Commit Graph

11174 Commits

Author SHA1 Message Date
Evan Hunt
3cc1e5e12a deprecate "dialup" and "heartbeat-interval"
these options concentrate zone maintenance actions into
bursts for the benefit of servers with intermittent connections.
that's no longer something we really need to optimize.

(cherry picked from commit eeeccec67c)
2023-08-01 18:41:49 -07:00
Mark Andrews
0e4872a12a Use $() instead of backticks
(cherry picked from commit 162db75e2b)
2023-08-02 00:31:30 +00:00
Mark Andrews
b1a9077011 Use sub shell to isolate enviroment changes
'HOME=value command' should only change HOME for command but on
some platforms this occasionally sets HOME for the rest of the
test. Explicitly isolate the enviroment change using a sub shell.

(cherry picked from commit 96f75bba18)
2023-08-02 09:56:27 +10:00
Aram Sargsyan
18ba295abe Fix dig help message typo in the http-plain-get option
The option name is misspelled as 'https-plain-get'. Fix the error.

(cherry picked from commit 77d1476c46)
2023-08-01 11:22:10 +00:00
Matthijs Mekking
a21407d062 Ignore max-zone-ttl on dnssec-policy insecure
Allow larger TTL values in zones that go insecure. This is necessary
because otherwise the zone will not be loaded due to the max-zone-ttl
of P1D that is part of the current insecure policy.

In the keymgr.c code, default back to P1D if the max-zone-ttl is set
to zero.

(cherry picked from commit dc6dafdad1)
2023-08-01 09:53:03 +02:00
Mark Andrews
022397a2c7 Check GSS-API TKEY against non configured server
Check for the expected error message which includes rcode REFUSED
then reload the server to specify the keytab for the rest of the
GSSAPI tests.

(cherry picked from commit 3a2a24903c)
2023-07-29 05:46:32 +10:00
Mark Andrews
aeab068adc Report TKEY query errors in nsupdate
(cherry picked from commit f244619680)
2023-07-29 05:46:32 +10:00
Štěpán Balážik
ffe0cb4bb0 Fix ecdsa256 check in ecdsa system test setup
Probably by copy-paste mistake, ecdsa384 was checked twice.

(cherry picked from commit 10194baa07)
2023-07-28 09:15:06 +02:00
Tom Krizek
774b9bc629 Disable resolve checks under TSAN
The resolve binary is affected by GL#4119 which occassionally makes it
hand during system tests when running with TSAN. This is a workaround to
avoid wasting resources caused by a CI timeout for the system test tsan
jobs.
2023-07-25 14:05:28 +02:00
Tom Krizek
0d88cd444b Reproducer for CVE-2023-2911
The conditions that trigger the crash:
- a stale record is in cache
- stale-answer-client-timeout is 0
- multiple clients query for the stale record, enough of them to exceed
  the recursive-clients quota
- the response from the authoritative is sufficiently delayed so that
  recursive-clients quota is exceeded first

The reproducer attempts to simulate this situation. However, it hasn't
proven to be 100 % reproducible, especially in CI. When reproducing
locally, the priming query also seems to sometimes interfere and prevent
the crash. When the reproducer is ran twice, it appears to be more
reliable in reproducing the issue.

(cherry picked from commit f617512d37)
2023-07-25 10:34:33 +02:00
Tom Krizek
744185f524 Clean up keys directory in checkconf test
The keys directory should be cleaned up in clean.sh. Doing that in the
test itself isn't reliable which may lead to failing mkdir which causes
the test to fail with set -e.

(cherry picked from commit 062dfac28e)
2023-07-25 09:21:50 +02:00
Aram Sargsyan
67f4b9d2a6 Fix a bug in an utility script for the statschannel system test
Because of a typo, the fetch.pl script tries to extract the server
address from the input parameter 'a' instead of 's'. Fix the typo.

(cherry picked from commit aa7538fd38)
2023-07-19 13:25:17 +00:00
Tom Krizek
42d7c0e92a Merge tag 'v9.18.17' into bind-9.18 2023-07-19 14:36:57 +02:00
Mark Andrews
d865ca788f Use absolute path to locate run.gdb
(cherry picked from commit 3f7723cdff)
2023-07-19 12:37:48 +10:00
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
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
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
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
Michał Kępień
ebab8b7705 Fix typo in tests_shutdown.py 2023-07-06 15:46:16 +02:00