Commit Graph
28240 Commits
Author SHA1 Message Date
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
Mark Andrews 1ed4fcdc9f Merge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test-c-v9_11' into 'v9_11'
Resolve "Add calls to dns_rdata_additionaldata to lib/dns/tests/rdata_test.c"

See merge request isc-projects/bind9!2879
2020-01-14 09:38:15 +00:00
Mark Andrews 9b71352f25 exercise dns_rdata_checknames
(cherry picked from commit b3c1b2a869)
2020-01-14 09:17:10 +00:00
Mark Andrews ecdb80ca85 exercise dns_rdata_additionaldata
(cherry picked from commit 649a34d628)
2020-01-14 09:17:10 +00:00
Mark Andrews 83b5274f84 call dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire
(cherry picked from commit 5e74550740)
2020-01-14 09:17:10 +00:00
Ondřej Surý b65df9526b Merge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_reference-2-v9_11' into 'v9_11'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1960 in decrement_reference"

See merge request isc-projects/bind9!2874
2020-01-14 08:02:57 +00:00
Mark AndrewsandOndřej Surý 3a9cdba3d8 Add is_leaf and send_to_prune_tree.
Add is_leaf and send_to_prune_tree to make the logic easier
to understand in cleanup_dead_nodes and decrement_reference.

(cherry picked from commit c6efc0e50f)
2020-01-14 08:35:37 +01:00
Mark AndrewsandOndřej Surý 4db29f1f7d Testing node->down requires the tree lock to be held.
In decrement_reference only test node->down if the tree lock
is held.  As node->down is not always tested in
decrement_reference we need to test that it is non NULL in
cleanup_dead_nodes prior to removing the node from the rbt
tree.  Additionally it is not always possible to aquire the
node lock and reactivate a node when adding parent nodes.
Reactivate such nodes in cleanup_dead_nodes if required.

(cherry picked from commit 176b23b6cd)
2020-01-14 08:35:37 +01:00
Mark Andrews 17945a1d03 Merge branch 'u/fanf2/rndc-secroots-newlines-v9_11' into 'v9_11'
Fix line spacing in `rndc secroots`

See merge request isc-projects/bind9!2867
2020-01-13 22:13:40 +00: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
Michal Nowak 89b26276bc Merge branch 'mnowak/add-openSUSE-Tumblewed-image-v9_11' into 'v9_11'
[v9_11] Add openSUSE Tumbleweed image to the CI

See merge request isc-projects/bind9!2876
2020-01-13 16:32:51 +00:00
Michal Nowak bb3bc5820a Add openSUSE Tumbleweed image to the CI
Ensure BIND is continuously tested on Tumbleweed, a pure rolling release
version of openSUSE.  This will allow BIND incompatibilities with latest
upstream versions of its dependencies to be caught more quickly.

(cherry picked from commit bd5dd1b58c60edb372bc6fa4eb39e355c5c76de4)
2020-01-13 16:32:51 +00:00
Michał Kępień cadc484d76 Merge branch 'michal/update-gitlab-ci-to-alpine-linux-3.11-v9_11' into 'v9_11'
[v9_11] Update GitLab CI to Alpine Linux 3.11

See merge request isc-projects/bind9!2862
2020-01-13 14:25:39 +00:00
Michał Kępień a89de9cbfc Update GitLab CI to Alpine Linux 3.11
Since Alpine Linux 3.11 is the current Alpine Linux release, replace
Alpine Linux 3.10 GitLab CI jobs with their up-to-date counterparts.

(cherry picked from commit bebf353eb5)
2020-01-13 15:09:01 +01:00
Michał Kępień 619e5aa276 Merge branch '1552-properly-detect-mmdb-lookup-failures-v9_11' into 'v9_11'
[v9_11] Properly detect MMDB lookup failures

See merge request isc-projects/bind9!2872
2020-01-13 14:07:21 +00:00
Michał Kępień c1e38394f2 Add CHANGES entry
5339.	[bug]		With some libmaxminddb versions, named could erroneously
			match an IP address not belonging to any subnet defined
			in a given GeoIP2 database to one of the existing
			entries in that database. [GL #1552]

(cherry picked from commit a070defb18)
2020-01-13 15:06:38 +01:00
Michał Kępień 28fe27e47e Properly detect MMDB lookup failures
Only comparing the value of the integer passed as the last argument to
MMDB_lookup_sockaddr() against MMDB_SUCCESS is not enough to ensure that
an MMDB lookup was successful - the 'found_entry' field of the
MMDB_lookup_result_s structure returned by that function also needs to
be true or else the remaining contents of that structure should be
ignored as the lookup failed.  Extend the relevant logical condition in
get_entry_for() to ensure the latter does not return incorrect MMDB
entries for IP addresses which do not belong to any subnet defined in a
given GeoIP2 database.

(cherry picked from commit 814da1c808)
2020-01-13 15:06:35 +01:00
Michał Kępień 832d904802 Merge branch 'michal/handle-catopen-errors' into 'v9_11'
Handle catopen() errors

See merge request isc-projects/bind9!2863
2020-01-13 13:03:35 +00:00
Michał Kępień daade37977 Handle catopen() errors
musl libc's implementation of catgets() crashes when its first argument
is -1 instead of a proper message catalog descriptor.  Prevent that from
happening by making isc_msgcat_get() return the default text if the
prior call to catopen() returns an error.
2020-01-13 14:03:11 +01:00
Mark Andrews 21c707fb9a Merge branch '1464-unchecked-returns-in-v9_11-as-reported-by-coverity-2' into 'v9_11'
Resolve "Unchecked returns in v9_11 as reported by Coverity."

See merge request isc-projects/bind9!2727
2020-01-13 05:44:58 +00:00
Mark Andrews 939f2fa2f5 formally discard return value 2020-01-13 05:07:13 +00:00
Michał Kępień e7f2fc0106 Merge branch 'ondrej/run-full-pipeline-on-schedule-v9_11' into 'v9_11'
[v9_11] Run all jobs on scheduled builds (including OpenBSD and Windows)

See merge request isc-projects/bind9!2860
2020-01-10 10:21:01 +00:00
Ondřej SurýandMichał Kępień f70548724d Run all jobs on scheduled builds (including OpenBSD and Windows)
(cherry picked from commit 52773e226a)
2020-01-10 11:19:32 +01:00
Michał Kępień 01be66f0fe Merge branch 'ondrej/stop-retrying-system-tests-v9_11' into 'v9_11'
[v9_11] Stop retrying the system tests; we should fix the tests instead

See merge request isc-projects/bind9!2858
2020-01-10 10:15:10 +00:00
Ondřej SurýandMichał Kępień dfa4e9199e Stop retrying the system tests; we should fix the tests instead
(cherry picked from commit 8ad67f8b9f)
2020-01-10 11:14:05 +01:00
Michał Kępień 325ac4977b Merge branch '1431-summary-sanitizer-grep-is-dangerous-v9_11' into 'v9_11'
[v9_11] Resolve ""SUMMARY: .*Sanitizer" grep is dangerous"

See merge request isc-projects/bind9!2856
2020-01-10 10:12:58 +00: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
Michał Kępień 8b114ea0c0 Merge branch 'ondrej/keep-sanitizer-tainted-system-tests-files-v9_11' into 'v9_11'
[v9_11] Don't clean the system test temporary files if sanitizer reports were found inside

See merge request isc-projects/bind9!2854
2020-01-10 09:50:35 +00: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ń db6060a1d0 Merge branch 'michal/fix-the-forward-system-test-on-windows-v9_11' into 'v9_11'
[v9_11] Fix the "forward" system test on Windows

See merge request isc-projects/bind9!2852
2020-01-10 09:45:19 +00: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
Michał Kępień d1af3126ca Merge branch '1479-_wait_for_rcode-adds-extraneous-query-v9_11' into 'v9_11'
[v9_11] Resolve "_wait_for_rcode adds extraneous query"

See merge request isc-projects/bind9!2850
2020-01-10 09:42:50 +00: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
Michał Kępień b7cb19b5ca Merge branch '1453-the-zero-system-test-timeouts-intermittently-v9_11' into 'v9_11'
[v9_11] Bail-out early if dig fails to finish successfully or takes too long

See merge request isc-projects/bind9!2848
2020-01-10 09:26:47 +00: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
Michał Kępień d315ae4df6 Merge branch '1458-intermittent-failure-in-the-forward-system-test-v9_11' into 'v9_11'
[v9_11] Resolve "Intermittent failure in the forward system test"

See merge request isc-projects/bind9!2846
2020-01-10 09:03:25 +00: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
Michał Kępień 17bd634119 Merge branch '1407-intermittent-failure-in-the-mkeys-system-test-v9_11' into 'v9_11'
[v9_11] Improve the error handling in mkeys test and use retry_quiet()

See merge request isc-projects/bind9!2840
2020-01-09 13:04:18 +00: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
Michał Kępień 9b652af90e Merge branch '1410-intermittent-failure-in-the-resolver-test-v9_11' into 'v9_11'
[v9_11] Resolve "Intermittent failure in the resolver test"

See merge request isc-projects/bind9!2838
2020-01-09 11:15:44 +00: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