Commit Graph
8815 Commits
Author SHA1 Message Date
Mark Andrews a262ff515b check that all servers have finished loading before beginging tests
(cherry picked from commit 4a992c7a18)
2020-01-24 08:20:31 +11:00
Witold Kręcicki e18cdac443 tests: add a missing log nextpart in inline test 2020-01-21 16:15:07 +01:00
Mark Andrews 2eb1b00d24 document that nslookup defaults to A + AAAA lookups
(cherry picked from commit 938fc81493)
2020-01-20 10:48:25 +11:00
Michał Kępień c9a12b8a1b Make retry_quiet() available on Windows
When retry_quiet() was backported to v9_11, it was only placed in
bin/tests/system/conf.sh.in, but not in bin/tests/system/conf.sh.win32.
This prevents every system test which employs this shell function either
directly or indirectly from ever succeeding on Windows.  Fix by copying
the definition of retry_quiet() to bin/tests/system/conf.sh.win32.
2020-01-16 21:37:06 +01:00
Michał Kępień a4f6af58b2 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 451484b870)
2020-01-16 09:50:16 +01:00
Mark AndrewsandMichał Kępień 8c857665d0 address some timing issues in inline system test
(cherry picked from commit 2dc4d72fa9)
2020-01-14 14:49:52 +01:00
Matthijs MekkingandMichał Kępień 553a2498e1 Move wait_for_log to conf.sh.common
(cherry picked from cfaa631f65)
2020-01-14 14:49:52 +01:00
Mark AndrewsandMichał Kępień 24d52c1a38 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message

(cherry picked from commit 17d25dbf47)
2020-01-14 13:24:26 +01:00
Mark AndrewsandMichał Kępień 57cd453b1e improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.

(cherry picked from commit 895f60d6f8)
2020-01-14 12:20:19 +01:00
Mark AndrewsandMichał Kępień e49100c9ab suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.

(cherry picked from commit 28695f1c92)
2020-01-14 12:20:18 +01:00
Mark AndrewsandMichał Kępień a3343b61ba Improve forensic logging in "testing basic zone transfer functionality"
Split the "testing basic zone transfer functionality" into primary and
secondary parts to improve forensic logging.

(cherry picked from commit 14ef8b10af)
2020-01-14 12:20:16 +01:00
Tony FinchandMark Andrews e0a7baa6af Fix line spacing in rndc secroots
Before this change, there was a missing blank line between the
negative trust anchors for one view, and the heading line for the next
view. This is because dns_ntatable_totext() omits the last newline.
There is an example of the incorrect output below; the fixed output
has a blank line before "Start view auth".

secure roots as of 21-Oct-2019 12:03:23.500:

 Start view rec
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:15.000
 Start view auth
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:07.000

(cherry picked from commit 5b600c2cd8)
2020-01-14 08:57:17 +11:00
Mark AndrewsandMichał Kępień d0b50c9681 replace grep -r with 'find -type f | xargs'
(cherry picked from commit 36ce99d8a4)
2020-01-10 10:52:14 +01:00
Ondřej SurýandMichał Kępień 115610a7ee Don't clean the system test temporary files if sanitizer reports were found inside
(cherry picked from commit 7489e6e6f9)
2020-01-10 10:49:06 +01:00
Michał Kępień e2d0135056 Fix the "forward" system test on Windows
Make sure carriage return characters are stripped from sed input to
enable the "forward" system test to pass on Windows.

(cherry picked from commit 075613aea4)
2020-01-10 10:44:20 +01:00
Mark AndrewsandMichał Kępień d638c84e7f consume all arguments we have processed in shift
(cherry picked from commit 0ee0580fc9)
2020-01-10 10:41:32 +01:00
Ondřej SurýandMichał Kępień 0d645351db Bail-out early if dig fails to finish successfully or takes too long
Before, the zero system test could get stuck almost infinitely, because
the first test sends > 300 queries with 5 seconds timeout on each in
each pass.  If named crashed early, it would took the test more than 4
hours to properly timeout.

This commit introduces a "watchdog" on the dig commands running in the
background and failing the test on timeout, failing any test if any dig
command fails to return successfully, and making the tests.sh script
shellcheck clean.

(cherry picked from commit 2a65a47f39)
2020-01-10 10:04:35 +01:00
Ondřej SurýandMichał Kępień aed6f507f3 Wait for named to forward the question before testing the validity
(cherry picked from commit fb03edacd8)
2020-01-10 09:29:30 +01:00
Ondřej SurýandMichał Kępień 45094c50d2 Make forward system test shellcheck clean
(cherry picked from commit 0e15cbb092)
2020-01-10 09:29:30 +01:00
Ondřej SurýandMichał Kępień 4b14cbb285 Use $n to keep diagnostic output of every individual test separate
(cherry picked from commit 10f4cd066f)
2020-01-10 09:29:30 +01:00
Ondřej SurýandMichał Kępień f01d2a4a79 Add the standard $n to each test
(cherry picked from commit 64df488e1e)
2020-01-10 09:29:28 +01:00
Ondřej SurýandMichał Kępień 4d372bf012 Wait for 'all zones loaded' message instead of zoneless 'loaded serial' message
(cherry picked from commit b0ad689e16)
2020-01-09 13:37:26 +01:00
Ondřej SurýandMichał Kępień bf644c901c Save all rndc diagnostic output
(cherry picked from commit 3b63c51a64)
2020-01-09 13:36:54 +01:00
Ondřej SurýandMichał Kępień 01feaa2b43 Address ShellCheck warnings
(cherry picked from commit 4ff25c06c1)
2020-01-09 13:31:29 +01:00
Ondřej SurýandMichał Kępień a63cad9647 Improve the error handling in mkeys test and use retry_quiet()
(cherry picked from commit f239d67c1a)
2020-01-09 12:40:54 +01:00
Diego FronzaandMichał Kępień 5169c21b2c Improved prefetch disabled test code
Using retry_quiet to test that prefetch is disabled instead of a
standard loop with sleep 1 between each iteration.

(cherry picked from commit 994fc2e822)
2020-01-09 11:45:03 +01:00
Diego FronzaandMichał Kępień 89129a3a85 Fix resolver tests: prefetch 40/41
These two tests were failing basically because in order for prefetching to
happen, the TTL for a given DNS record must be greater than or equal to
the prefetch config value + 9.

The previous TTL for both records was 10, while prefetch value in
configuration was 3, thus making only records with TTL >= 12 elligible
for prefetching.

TTL value for both records was adjusted to the value 13, and prefetch
value was set to 4 (inc by 1), so records with TTL (4 + 9) >= 13 are
elligible for prefetching.

Adjusting prefetch value to 4 gives the test 1 second more to avoid time
problems when sharing resources on a heavy loaded PC.

Also prefetch value in settings is now read by the script and used
by it to corrrectly calculate the amount of time needed to delay before
sending a request to trigger prefetch, adding a bit of flexibility to
fine tune the test in the future.

(cherry picked from commit a711d6f8c0)
2020-01-09 11:44:44 +01:00
Diego FronzaandMichał Kępień f06c1dde90 Fix resolver test: prefetch disabled
The previous test had two problems:
1. It wasn't written specifically for testing what it was supposed to:
prefetch disabled.
2. It could fail in some circunstances if the computer's load is too
high, due to sleeps not taking parallel tests and cpu load into account.

The new test is testing prefetch disabled as follows:
1. It asks for a txt record for a given domain and takes note of the
record's TTL (which is 10).
2. It sleeps for (TTL - 5) = 5 seconds, having a window of 5 seconds to
issue new queries before the record expires from cache.
3. Three(3) queries are executed in a row, with a interval of 1 second
between them, and for each query we verify that the TTL in response is
less than the previous one, thus ensuring that prefetch is disabled (if
it were enabled this record would have been refreshed already and TTL
would be >= the first TTL).

Having a window of 5 seconds to perform 3 queries with a interval of 1
second between them gives the test a reasonable amount of time
to not suffer from a machine with heavy load.

(cherry picked from commit dd524cc893)
2020-01-09 11:32:38 +01:00
Mark AndrewsandMichał Kępień ab9e50e683 Increase wait_for_message attempts to 20.
(cherry picked from commit 4dd9ec8919)
2020-01-09 10:47:16 +01:00
Mark AndrewsandMichał Kępień de942601fe save wait_for_message contents
(cherry picked from commit 1334daaec0)
2020-01-09 10:47:16 +01:00
Ondřej SurýandMichał Kępień 2756dff680 Use retry() and nextpart*() to simplify catz test
(cherry picked from commit 51b05189f7)
2020-01-08 15:19:17 +01:00
Witold KręcickiandMichał Kępień 0f2ef0ca34 Fix timing issues in catz test
Make the log checks more precise and use the retry() function for
repeating the checks.

(cherry picked from commit 9b43e65c01)
2020-01-08 15:19:17 +01:00
Michał Kępień 609c7dc79e Implement a "read-only" version of nextpart()
The system test helper function nextpart() always updates the "lines
read so far" marker ("<file>.prev") when it is called, which somewhat
limits its flexibility.  Add two new helper functions, nextpartpeek()
and nextpartreset(), so that certain parts of log files can be easily
examined more than once.  Add some documentation to help understand the
purpose of each function in the nextpart*() family.

(cherry picked from commit facb68b22e)
2020-01-08 15:19:17 +01:00
Michał Kępień 4133648ee0 Only run managed keys tests for builds with crypto 2020-01-08 13:17:10 +01:00
Ondřej SurýandMichał Kępień e2aab0cbf1 Fix multiple issues in named setuid check
(cherry picked from commit 4a6d9ea152)
2020-01-08 13:07:42 +01:00
Evan HuntandMichał Kępień e6d99c2d4e fixed a test failure, some other shell cleanup
(cherry picked from commit dc760867d8)
2020-01-08 13:07:42 +01:00
Ondřej SurýandMichał Kępień fbd685b827 Instead of sleeping for a fixed time, wait for named to log specific message in a loop
(cherry picked from commit 355eb0c288)
2020-01-08 13:07:42 +01:00
Ondřej SurýandMichał Kępień e5881bcff1 Make runtime/tests.sh shellcheck and set -e clean
This mostly comprises of:

* changing the directories in subshell and not ignoring `cd` return code
* handling every error gracefully instead of ignoring the return code

(cherry picked from commit 57b6aeabd5)
2020-01-08 13:07:40 +01:00
Ondřej SurýandMichał Kępień 8b23127687 Further improve the runtime tests to look for a specific instead of generic error
(cherry picked from commit d26e7166a6)
2020-01-08 12:51:14 +01:00
Ondřej SurýandMichał Kępień 66f9d83164 Fix couple of no-op tests to actually test something (configuration files were missing)
(cherry picked from commit 60f335204a)
2020-01-08 12:51:14 +01:00
Ondřej SurýandMichał Kępień 28e2528f02 runtime test: make the pidfiles match the names of configuration files
(cherry picked from commit fe021299e0)
2020-01-08 12:51:04 +01:00
Ondřej SurýandMichał Kępień 774da247bd runtime test: use helper function that kills named and waits for the finish
(cherry picked from commit e9d348bac5)
2020-01-08 12:33:02 +01:00
Mark AndrewsandOndřej Surý de560f98a2 Address timing issues in 'inline' system test.
"rndc signing -serial <value>" could take longer than a second to
complete.  Loop waiting for update to succeed.

For tests where "rndc signing -serial <value>" is supposed to not
succeed, repeatedly test that we don't get the new serial, then
test that we have the old value.  This should prevent false negatives.

(cherry picked from commit 13fa80ede8)
2020-01-08 08:32:06 +01:00
Ondřej SurýandMichał Kępień 1007882fee Detect cores on FreeBSD
(cherry picked from commit 38277ddb0b)
2020-01-07 15:59:37 +01:00
Ondřej SurýandMichał Kępień e694c22386 Reduce the minimal numbers of days in jitter test to 5
(cherry picked from commit 4b2911a45a)
2020-01-07 15:53:10 +01:00
Ondřej SurýandMichał Kępień cef4c4f708 Tune the performance of CDS/CDNSKEY deletion test
(cherry picked from commit 76eac9a691)
2020-01-07 15:53:10 +01:00
Ondřej SurýandMichał Kępień 0eab5260fe Tune the performance of oldsigs test
The oldsigs test was checking only for the validity of the A
a.oldsigs.example. resource record and associated DNSSEC signature while
the zone might not have been fully signed yet leading to validation
failures because of bogus signatures on the validation path.

This commit changes the test to test that all old signatures in the
oldsigs.example. zone were replaced and the zone is fully resigned
before running the main check.

(cherry picked from commit 519b047362)
2020-01-07 15:53:07 +01:00
Ondřej SurýandMichał Kępień c76b83c420 Tune the performance of the jitter test
(cherry picked from commit ffb7ae8beb)
2020-01-07 15:50:51 +01:00
Ondřej SurýandMichał Kępień b77d31fa10 Wait a little bit longer for autosign, bail out on not enough categories
(cherry picked from commit f1cbdc5498)
2020-01-07 15:37:54 +01:00
Ondřej SurýandMichał Kępień a40ceb292e Adjust the jitter range to +-3*stddev
(cherry picked from commit d6f68fc4f0)
2020-01-07 15:37:54 +01:00