Commit graph

9496 commits

Author SHA1 Message Date
Ondřej Surý
5eb3f71a3e Refactor the isc_mempool_create() usage using the semantic patch
The isc_mempool_create() function now cannot fail with ISC_R_MEMORY.
This commit removes all the checks on the return code using the semantic
patch from previous commit, as isc_mempool_create() now returns void.
2020-02-03 08:27:16 +01:00
Mark Andrews
d159fdf25d add more CDS / CDNSKEY deletion record tests 2020-01-30 11:29:27 +11:00
Mark Andrews
68a360772f check CDS and CDNSKEY content 2020-01-30 11:29:27 +11:00
Mark Andrews
379949cce4 check kskonly key ids 2020-01-30 11:29:27 +11:00
Mark Andrews
f91b3a69ce check that a CDNSKEY deletion record is accepted 2020-01-30 11:18:16 +11:00
Mark Andrews
0adb4b25d3 handle CDS deletion record in consistancy checks 2020-01-30 11:18:16 +11:00
Michał Kępień
a8836b381f List atypical failures in system test summary
Each system test can be marked as failed not only due to some tested
component(s) not behaving as expected, but also because of core dumps,
assertion failures, and/or ThreadSanitizer reports being found among its
artifacts.  Make the system test summary list the tests which exhibit
such atypical symptoms to more clearly present the nature of problems
found.
2020-01-29 14:50:26 +01:00
Mark Andrews
7b0ba6eb10 wait longer for dynamic zone to be transfered 2020-01-28 04:38:38 +00:00
Mark Andrews
784e64f238 wait for root server to complete reloading 2020-01-23 21:39:18 +00:00
Mark Andrews
9b6df37303 wait for the ./NS lookup to complete 2020-01-23 19:16:05 +00:00
Mark Andrews
4a992c7a18 check that all servers have finished loading before beginging tests 2020-01-23 19:16:05 +00:00
Mark Andrews
c6ba51cfc4 wait for log message before testing that mirror zone is correctly removed 2020-01-23 04:00:53 +00:00
Mark Andrews
b3f06729e5 address timing issues in padding system test
'rndc stats' is not instantaneous. Wait for the dump to complete
before looking at the content.
2020-01-23 12:43:03 +11:00
Diego Fronza
7417b79c7a Added test for the proposed fix
Added test to ensure that NXDOMAIN is returned when BIND is queried for a
non existing domain in CH class (if a view of CHAOS class is configured)
and that it also doesn't crash anymore in those cases.
2020-01-22 16:15:51 -03:00
Michal Nowak
20b446cdc3 mkeys: Prevent failing grep invocations
Some 'grep' invocations were not guarded from interrupting the test
prematurely, e.g. when no text was matched.
2020-01-22 14:53:01 +00:00
Witold Kręcicki
b5cfc1c056 Get rid of the remains of -Tdelay option 2020-01-22 12:16:59 +01:00
Witold Kręcicki
43279de8e6 pipelined test: we no longer have -Tdelay option, use a python proxy that delays packets as a workaround 2020-01-22 12:16:59 +01:00
Witold Kręcicki
796b38fe0c tests: add a missing log nextpart in inline test 2020-01-21 14:03:09 +00:00
Tony Finch
4227b7969b dnssec: do not publish CDS records when -Psync is in the future
This is a bug I encountered when trying to schedule an algorithm
rollover. My plan, for a zone whose maximum TTL is 48h, was to sign
with the new algorithm and schedule a change of CDS records for more
than 48 hours in the future, roughly like this:

    $ dnssec-keygen -a 13 -fk -Psync now+50h $zone
    $ dnssec-keygen -a 13 $zone
    $ dnssec-settime -Dsync now+50h $zone_ksk_old

However the algorithm 13 CDS was published immediately, which could
have made the zone bogus.

To reveal the bug using the `smartsign` test, this change just adds a
KSK with all its times in the future, so it should not affect the
existing checks at all. But the final check (that there are no CDS or
CDSNSKEY records after -Dsync) fails with the old `syncpublish()`
logic, because the future key's sync records appear early. With the
new `syncpublish()` logic the future key does not affect the test, as
expected, and it now passes.
2020-01-21 16:39:31 +11:00
Mark Andrews
938fc81493 document that nslookup defaults to A + AAAA lookups 2020-01-19 23:14:07 +00:00
Michał Kępień
451484b870 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.
2020-01-16 09:48:01 +01:00
Tinderbox User
05f2241fcb prep 9.15.8 2020-01-16 08:01:20 +00:00
Evan Hunt
fa04c87578 add system test of insecurity proof from negative cache 2020-01-15 13:55:33 -08:00
Witold Kręcicki
493b6a9f33 Make hazard pointers max_threads configurable at runtime.
hp implementation requires an object for each thread accessing
a hazard pointer. previous implementation had a hardcoded
HP_MAX_THREAD value of 128, which failed on machines with lots of
CPU cores (named uses 3n threads). We make isc__hp_max_threads
configurable at startup, with the value set to 4*named_g_cpus.
It's also important for this value not to be too big as we do
linear searches on a list.
2020-01-14 21:26:57 +01:00
Evan Hunt
fc36798a81 allow both key and DS trust anchors to be used for the same name. 2020-01-14 11:17:30 -08:00
Evan Hunt
b984a4b647 disable adding keys to keytable; only DS trust anchors can now be added
the internal keytable structure has not yet been changed, but
insertion of DS anchors is the only method now available.

NOTE: the keytable unit test is currently failing because of tests
that expect individual keynode objects to contain single DST key
objects.
2020-01-14 09:24:22 -08:00
Evan Hunt
7fdf40770f remove all code that uses non-DS trust anchors
as initial-key and static-key trust anchors will now be stored as a
DS rrset, code referencing keynodes storing DNSKEY trust anchors will
no longer be reached.
2020-01-14 09:24:13 -08:00
Ondřej Surý
a910b0a839 Protect globally accessed variables in rndc.c by making them C11 atomic 2020-01-14 13:12:13 +01:00
Evan Hunt
90a1dabe74 count statistics in netmgr UDP code
- also restored a test in the statistics test which was changed when
  the netmgr was introduced because active sockets were not being
  counted.
2020-01-13 14:09:37 -08:00
Evan Hunt
80a5c9f5c8 associate socket stats counters with netmgr socket objects
- the socket stat counters have been moved from socket.h to stats.h.
- isc_nm_t now attaches to the same stats counter group as
  isc_socketmgr_t, so that both managers can increment the same
  set of statistics
- isc__nmsocket_init() now takes an interface as a paramter so that
  the address family can be determined when initializing the socket.
- based on the address family and socket type, a group of statistics
  counters will be associated with the socket - for example, UDP4Active
  with IPv4 UDP sockets and TCP6Active with IPv6 TCP sockets.  note
  that no counters are currently associated with TCPDNS sockets; those
  stats will be handled by the underlying TCP socket.
- the counters are not actually used by netmgr sockets yet; counter
  increment and decrement calls will be added in a later commit.
2020-01-13 14:05:02 -08:00
Tony Finch
5b600c2cd8 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
2020-01-13 05:48:09 +00:00
Mark Andrews
2dc4d72fa9 address some timing issues in inline system test 2020-01-08 08:23:03 +01:00
Mark Andrews
13fa80ede8 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.
2020-01-07 16:14:12 +01:00
Mark Andrews
05aa45c602 improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.
2020-01-07 14:23:48 +01:00
Mark Andrews
9bd6720f58 suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.
2020-01-07 14:23:17 +01:00
Mark Andrews
46982b414b 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.
2020-01-07 14:23:08 +01:00
Matthijs Mekking
935a2ae33f Update copyrights 2020
Happy New Year!
2020-01-06 15:05:03 +01:00
Evan Hunt
2df13f79ef update copyright year to 2020 2020-01-02 21:45:30 -08:00
Mark Andrews
41d827893e update usage message 2019-12-20 08:28:37 +00:00
Ondřej Surý
b218bf5227 Fix the concurrent access to batchname in dig.c 2019-12-20 03:43:04 +00:00
Petr Menšík
85f3476894 Include protobuf-c version
Include used version of protobuf-c in version info, both link time and
runtime version is available.
2019-12-17 23:46:52 +00:00
Petr Menšík
e6d7384c0d Provide GeoIP2 library version in version
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.
2019-12-17 23:46:52 +00:00
Mark Andrews
17d25dbf47 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message
2019-12-13 08:31:56 +00:00
Tinderbox User
e088272172 prep 9.15.7 2019-12-12 23:59:39 +00:00
Diego Fronza
114520425c Added tcp-highwater test on initial statistics verification
The initial tcp statistics test was not testing tcp-highwater counter,
but only initial number of current TCP clients, so this missing test was
added to ensure initial tcp-highwater value is correct.
2019-12-12 11:23:11 -08:00
Ondřej Surý
b6960da6c8 Enable ThreadSanitizer enabled build, system and unit tests 2019-12-11 17:24:05 +01:00
Michał Kępień
c0be772ebc Include prepare-softhsm2.sh in source tarballs
The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.
2019-12-11 12:04:29 +01:00
Michał Kępień
075613aea4 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.
2019-12-11 09:44:20 +01:00
Mark Andrews
0ee0580fc9 consume all arguments we have processed in shift 2019-12-11 00:01:08 +00:00
Michał Kępień
2ee7ff23ce Only use LC_ALL=C where intended
The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.
2019-12-10 10:56:19 +01:00