Commit Graph
11471 Commits
Author SHA1 Message Date
Tom Krizek 2b8e5e1155 Handle non-zero return codes in resolver test 2023-07-14 15:49:17 +02:00
Tom Krizek cde02fdb6a Handle non-zero return codes in statschannel test 2023-07-14 15:49:17 +02:00
Tom Krizek 4a87b44196 Handle non-zero return codes in checkconf test 2023-07-14 15:49:17 +02:00
Tom Krizek 9d383dce40 Handle non-zero return codes in dnstap test 2023-07-14 15:49:17 +02:00
Tom Krizek ede8ea889b Handle non-zero return codes in kasp test 2023-07-14 15:49:17 +02:00
Tom Krizek 4e8802a22d Handle non-zero return codes in serve-stale test 2023-07-14 15:49:17 +02:00
Tom Krizek fae6808b9c Handle non-zero return codes in doth test 2023-07-14 15:49:17 +02:00
Tom Krizek 1e64749ed3 Handle non-zero return codes in acl test 2023-07-14 15:49:17 +02:00
Tom Krizek 3a36ff506d Handle non-zero return codes in statistics test 2023-07-14 15:49:16 +02:00
Tom Krizek 9fdf537f52 Handle non-zero return codes in rrsetorder test 2023-07-14 15:49:16 +02:00
Tom Krizek 45fc4cc465 Handle non-zero return codes in redirect test 2023-07-14 15:49:16 +02:00
Tom Krizek c50a9e158d Handle non-zero return codes in rndc test 2023-07-14 15:49:16 +02:00
Tom Krizek 36d74bd2e3 Handle non-zero return codes in inline test 2023-07-14 15:49:16 +02:00
Tom Krizek f3310e1731 Handle non-zero return codes unknown test 2023-07-14 15:49:16 +02:00
Tom Krizek 86765ad1d3 Handle non-zero return codes in nsupdate test 2023-07-14 15:49:16 +02:00
Tom Krizek e5933f65d6 Handle non-zero return codes in zonechecks test 2023-07-14 15:49:16 +02:00
Tom Krizek e8c61f8da4 Handle non-zero return codes in wildcard test 2023-07-14 15:49:16 +02:00
Tom Krizek 69e8876966 Handle non-zero return codes in zero test 2023-07-14 15:49:15 +02:00
Tom Krizek 3ce200ead8 Handle non-zero return codes in legacy test 2023-07-14 15:49:15 +02:00
Tom Krizek 2823d0b469 Handle non-zero return codes in forward test 2023-07-14 15:49:15 +02:00
Tom Krizek 855f5b143a Handle non-zero return codes in upforwd test 2023-07-14 15:49:15 +02:00
Tom Krizek 146cb978c5 Handle non-zero return codes in addzone test 2023-07-14 15:49:15 +02:00
Tom Krizek 247b608f62 Handle non-zero return codes in rpzrecurse test 2023-07-14 15:49:15 +02:00
Tom Krizek 1d5caafa9e Handle non-zero return codes in rpz test 2023-07-14 15:49:15 +02:00
Tom Krizek 837c190d9e 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`.
2023-07-14 15:49:15 +02:00
Tom Krizek 1436025e20 Use arithmetic expansion in system tests (followup)
These are manual edits in addition of the automated changes from the
previous commit.
2023-07-14 15:49:15 +02:00
Tom Krizek 4d42bdc245 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
2023-07-14 15:49:13 +02:00
Tom Krizek 01bc805f89 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.
2023-07-14 15:07:25 +02:00
Michal Nowak 89c77daddb 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.
2023-07-13 15:09:55 +02:00
Mark Andrews 189ca00a6e Check that BADCOOKIE is returned for a bad server COOKIE
Send a well formed, all zeros, DNS COOKIE option to a named instance
running with default cookie settings and check that BADCOOKIE is
returned.
2023-07-13 01:58:53 +00:00
Matthijs Mekking 9c40cf0566 Add test for "three is a crowd" bug (GL #2375)
Add this test scenario for a bug fixed a while ago. When a third key is
introduced while the previous rollover hasn't finished yet, the keymgr
could decide to remove the first two keys, because it was not checking
for an indirect dependency on the keys.

In other words, the previous bug behavior was that the first two keys
were removed from the zone too soon.

This test case checks that all three keys stay in the zone, and no keys
are removed premature after another new key has been introduced.
2023-07-06 09:27:29 +02:00
Matthijs Mekking 674249f66a Check all keys despite early failure
In the kasp script, if one expected key is not found, continue checking
the other key ids, even if there is no match for the first one.  This
provides a bit more information which keys mismatch and makes for
easier debugging test failures.
2023-07-06 09:27:29 +02:00
Tom Krizek 5f85f63bf1 Mark the test_named_shutdown[rndc] test as xfail
It is currently affected by #4060, making the unstable as it
occassionally fails.
2023-07-04 12:58:16 +02:00
Tom Krizek ceed694659 Use timeout for rndc status in shutdown test
Pass 5 second timeout to the rndc status command(s) to avoid hitting the
hard 10 second timeout from subprocess.call, which would result in an
unwanted exception that would only mask the real issue: if the rndc
status times out in this test, it is likely due to the server not
stopping as it should.
2023-07-04 12:58:16 +02:00
Tom Krizek 603c58ee28 Split shutdown test into separate test cases
The shutdown test attempts to shut down the server using two different
methods - rndc and sigterm. Use pytest.mark.parametrize to run these as
separate test cases for easier identification of failures.
2023-07-04 12:58:14 +02:00
Tom Krizek 76d9873ef6 Check for unset variables only after conf.sh is loaded
Make the cds/setup.sh compatible with the workaround which relies on
testing the TSAN_OPTIONS variable which may not be set.
2023-06-29 10:35:47 +02:00
Tom Krizek 06056c44a7 Fix checking for executables in shell conditions in tests
Surround the variables which are checked whether they're executable in
double quotes. Without them, empty paths won't be properly interpreted
as not executable.
2023-06-29 10:35:47 +02:00
Tom Krizek 384339dbba Only use delv if available in mkeys test
Check that $DELV is an executable before using it in a test.
2023-06-29 10:35:47 +02:00
Tom Krizek fbcf37f914 Disable delv tests under TSAN
Since delv can occasionally hang in system tests when running with TSAN
(see GL#4119), disable these tests as a workaround. Otherwise, the hung
delv process will just waste CI resources and prevent any meaningful
output from the rest of the test suite.
2023-06-29 10:35:47 +02:00
Mark Andrews e3e20ed76e Emit deprecated warning for K* file pairs
We try reading the same file using different methods so only
emit a warning if we successfully read the file.
2023-06-29 08:28:48 +10:00
Mark Andrews c91a208ef5 Test legacy HMAC key files with dig
tsig-keygen is now used to generate key files for TSIG.  These have
a different format to those that were generated by dnssec-keygen.
Test that dig can still read these files.
2023-06-29 08:28:48 +10:00
Mark Andrews e1fb17e72c Test support with legacy HMAC K files with nsupdate
tsig-keygen generates key files that are different to those that
where generated by dnssec-keygen.  Check that nsupdate can still
read those old format files.
2023-06-29 08:28:48 +10:00
Mark Andrews 3f93d3f757 Restore the ability to read legacy K*+157+* files
The ability to read legacy HMAC-MD5 K* keyfile pairs using algorithm
number 157 was accidentally lost when the algorithm numbers were
consolidated into a single block, in commit
09f7e0607a.

The assumption was that these algorithm numbers were only known
internally, but they were also used in key files. But since HMAC-MD5
got renumbered from 157 to 160, legacy HMAC-MD5 key files no longer
work.

Move HMAC-MD5 back to 157 and GSSAPI back to 160.  Add exception for
GSSAPI to list_hmac_algorithms.
2023-06-29 08:28:44 +10:00
Mark Andrews dd00b3c50b Use NS rather than A records for qname-minimization relaxed
Remove all references to DNS_FETCHOPT_QMIN_USE_A and adjust
the expected tests results in the qmin system test.
2023-06-28 11:45:59 +10:00
Evan Hunt 0b09ee8cdc explicitly set dnssec-validation in system tests
the default value of dnssec-validation is 'auto', which causes
a server to send a key refresh query to the root zone when starting
up. this is undesirable behavior in system tests, so this commit
sets dnssec-validation to either 'yes' or 'no' in all tests where
it had not previously been set.

this change had the mostly-harmless side effect of changing the cached
trust level of unvalidated answer data from 'answer' to 'authanswer',
which caused a few test cases in which dumped cache data was examined in
the serve-stale system test to fail. those test cases have now been
updated to expect 'authanswer'.
2023-06-26 13:41:56 -07:00
Tom Krizek 5f809e50b6 Check for proper file size output in dnstap test
Previously, the first check silently failed, as 454 is apparently (in my
local setup) the minimum output size for the dnstap output, rather than
470 which the test was expecting. Effectively, the check served as a 5
second sleep rather than waiting for the proper file size.

Additionally, check the expected file sizes and fail if expectations
aren't met.
2023-06-22 19:19:08 +02:00
Tom Krizek 1dd4c2b9e2 Check for proper log message in kasp test
The log message is supposed to contain the zone name which was
erroneously omitted, but didn't pop up during tests, since return code
was silently ignored.

Now it actually waits for the proper log message rather than being an
equivalent of 3 second sleep (which was also sufficient to make the test
pass, thus we detected no failure).
2023-06-22 19:19:05 +02:00
Tom Krizek 946d3131fa Fix echo_i typo in forward test 2023-06-22 19:12:46 +02:00
Michal Nowak 71439d0c3a Merge tag 'v9.19.14'
BIND 9.19.14
2023-06-21 19:31:57 +02:00
Michał Kępień a47dc810f7 Add a tool for reproducing ISC SPNEGO bugs
Extend the "tsiggss" system test with reproducers for CVE-2020-8625 and
CVE-2021-25216.
2023-06-19 09:20:03 +02:00