Commit Graph
4041 Commits
Author SHA1 Message Date
Mark Andrews dc30a355bd Also wait for 'zone_dump: zone example/IN: enter'
use nextpartpeek as we don't want to reset the starting point

(cherry picked from commit 7b65bea6d2)
2020-09-10 18:48:52 +10:00
Mark Andrews 690f557b09 Don't run dyndb and dlzexternal if running TSAN as
the dlopen flags being used are incompatible with TSAN.

(cherry picked from commit 86316ed29d)
2020-09-08 08:46:14 +10:00
Mark Andrews b66b5a096c alphabetize tests/usage
(cherry picked from commit bbece7389e)
2020-09-08 08:43:45 +10:00
Mark Andrews b1c36e7818 Check 'deny name' + 'grant subdomain' for the same name
(cherry picked from commit a402ffbced)
2020-09-03 16:22:54 +10:00
Mark Andrews b2c93102de Increase zone load timeout in the "rndc" test
The "huge.zone" zone can take longer than 100 seconds to load when
running under a sanitizer.  Increase the relevant zone load timeout to
prevent intermittent failures of the "rndc" system test.

(cherry picked from commit fd08918df5)
2020-09-03 07:15:54 +10:00
Mark Andrews 46dc1c34f9 dig +bufsize=0 failed to disable EDNS as a side effect.
(cherry picked from commit 0dc04cb901)
2020-09-02 20:47:19 +10:00
Mark AndrewsandOndřej Surý c237ca4d43 Dump the returned packet 2020-09-02 08:54:40 +02:00
Ondřej Surý 36ec930560 Add -r <repeats> option to packet.pl
For some tests, we need to send big data streams (for TCP) or repeated
packets (for UDP), this commits adds `-r` option to packet.pl that sends
the same input <repeats> times using the specified protocol.

(cherry picked from commit dd46559a19)
2020-09-02 08:54:40 +02:00
Ondřej Surý abae6c0f95 Properly format 2037-pk11_numbits-crash-test.pkt file
(cherry picked from commit 22e0272063)
2020-09-02 08:54:40 +02:00
Ondřej SurýandOndřej Surý a40151fe76 Add PoC system test for pk11_numbits() assertion
(cherry picked from commit a69433ba40)
2020-08-31 11:49:36 +02:00
Mark AndrewsandOndřej Surý 78d0355f30 check that a malformed truncated response to a TSIG query is handled
(cherry picked from commit 8bbf3eb5f3)
2020-08-31 08:35:10 +02:00
Evan Hunt 15d57a425e Merge tag 'v9_11_22' into v9_11
BIND 9.11.22
2020-08-20 12:10:47 -07:00
Michal Nowak d79c96da01 Make sure .txt files are not identified as crashed test
Previously .txt files with full backtrace may be identified as a
crashed test:

    I:Core dumps were found for the following system tests:
    I:	 core.19948-backtrace.txt
    I:   shutdown

Now .txt files are removed from the list.

Change 'run.sh.in' to match the core matching pattern in
'testsummary.sh'.

(cherry picked from commit c2dcd95966)
(cherry picked from commit 01119ac4f9)
2020-08-12 09:56:16 +02:00
Mark AndrewsandMichał Kępień 58e560beb5 Add a test for update-policy 'zonesub'
The new test checks that 'update-policy zonesub' is properly enforced.
2020-08-05 15:55:14 +02:00
Mark AndrewsandMichał Kępień 393e8f643c Add a test for update-policy 'subdomain'
The new test checks that 'update-policy subdomain' is properly enforced.
2020-08-05 15:55:14 +02:00
Mark Andrews d3281b80a9 Check rcode is FORMERR
(cherry picked from commit 88ff6b846c)
2020-08-04 23:08:49 +10:00
Michal Nowak fc1e50e73a Fix name of the test directory of stop.pl in masterformat test 2020-07-31 09:26:51 +02:00
Michal Nowak 9470e9e469 Ensure test fails if packet.pl does not work as expected 2020-07-31 09:26:51 +02:00
Michał Kępień 41e2117866 Only run system tests as root in developer mode
Running system tests with root privileges is potentially dangerous.
Only allow it when explicitly requested (by building with
--enable-developer).

(cherry picked from commit 3ef106f69d)
2020-07-31 07:47:49 +02:00
Diego FronzaandEvan Hunt 4bc9ee1844 Update copyrights 2020-07-27 13:40:50 -07:00
Diego FronzaandEvan Hunt 40fd600f25 Add test for RPZ wildcard passthru ignored fix 2020-07-27 13:40:50 -07:00
Mark Andrews b424dfaada Check walking the hip rendezvous servers.
Also fixes extraneous white space at end of record when
there are no rendezvous servers.

(cherry picked from commit 78db46d746)
2020-07-24 15:43:54 +10:00
Michal Nowak 3745767b2b Check tests for core files regardless of test status
Failed test should be checked for core files et al. and have
backtrace generated.
2020-07-20 17:09:20 +02:00
Michal Nowak 9996811493 Rationalize backtrace logging
GDB backtrace generated via "thread apply all bt full" is too long for
standard output, lets save them to .txt file among other log files.
2020-07-20 17:00:13 +02:00
Michał KępieńandMark Andrews 74a738428c Silence PyYAML warning
Make yaml.load_all() use yaml.SafeLoader to address a warning currently
emitted when bin/tests/system/dnstap/ydump.py is run:

    ydump.py:28: YAMLLoadWarning: calling yaml.load_all() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      for l in yaml.load_all(f.stdout):

(cherry picked from commit 62f631f798)
2020-06-30 11:43:35 +10:00
Mark Andrews 686ee5bd12 Check that 'rndc dnstap -roll <value>' works
(cherry picked from commit a289a57c7f)
2020-06-30 08:39:19 +10:00
Mark Andrews d958d51797 Just test for the two possible values rather than testing for ipv6.
testsock6 can return a false negative when testing under Windows.
2020-06-26 08:55:39 +00:00
Matthijs MekkingandMark Andrews 7e3777c28a Add todo in dnssec system test for [GL #1689]
Add a note why we don't have a test case for the issue.

It is tricky to write a good test case for this if our tools are
not allowed to create signatures for unsupported algorithms.

(cherry picked from commit c6345fffe9)
2020-06-25 22:49:38 +10:00
Mark Andrews dd43437388 Fix resolver system test on system without ipv6 (--disable-ipv6). 2020-06-05 10:42:55 +10:00
Ondřej Surý 7e2d9531a7 Change the invalid CIDR from parser error to warning
In [RT #43367], the BIND 9 changed the strictness of address / prefix
length checks:

    Check prefixes in acls to make sure the address and
    prefix lengths are consistent.  Warn only in
    BIND 9.11 and earlier.

Unfortunately, a regression slipped in and the check was made an error
also in the BIND 9.11.  This commit fixes the regression, but turning
the error into a warning.
2020-06-03 22:17:02 +02:00
Stephen MorrisandMichał Kępień 5fb65f4544 Add test for reduction in number of fetches
Add a system test that counts how many address fetches are made
for different numbers of NS records and checks that the number
are successfully limited.
2020-05-19 14:24:53 +02:00
Mark AndrewsandMichał Kępień 67ba3f8f3a Check that a 'BADTIME' response with 'QR=0' is handled as a request 2020-05-19 14:24:52 +02:00
Mark Andrews 809d55226b Address race in dnssec system test. 'clear signing records' can fail
as the update triggers by the rndc command to clear the signing records
may not have completed by the time the subsequent rndc command to test
that the records have been removed is commenced.  Loop several times to
prevent false negative.

(cherry picked from commit 353018c0e5)
2020-05-19 13:50:51 +10:00
Mark Andrews ae4f31e434 Retry checks that records are present and signed
There a race between when the delta is logged and when the
server returns signed record.  Retry the queries if the
lookups fail to meet expectations.

(cherry picked from commit 46c4e5d96f)
2020-05-18 16:00:51 +10:00
Mark Andrews 7c1043ae73 move provide-ixfr testing after the serial has been checked
(cherry picked from commit c7cdc47cc5)
(cherry picked from commit 89c1bc58e4)
2020-05-18 09:40:13 +10:00
Mark Andrews ee49cc6201 Check display of EDE option
(cherry picked from commit e6b0153f8a)
(cherry picked from commit 88e11a9971)
2020-05-13 12:18:55 +10:00
Mark AndrewsandOndřej Surý 31b863f3d1 Silence: E741 ambiguous variable name 'l'
(cherry picked from commit 189d21fb96)
2020-05-12 14:05:37 +02:00
Evan Hunt 1df4141279 initialize sockaddrdscp to prevent spurious output from 'named-checkconf -p'
(cherry picked from commit f8d753d452)
2020-05-06 12:48:13 -07:00
Evan Hunt 410ee752dd named-checkconf -z could exit with an incorrect staatus
the CHECK() macro resets result, so an error code from an earlier
view could be erased if the last view loaded had no errors.

(cherry picked from commit 7e73660206)
2020-05-01 17:47:44 -07:00
Mark Andrews 0c21ddcac6 Add more special zones to addzone restart test.
Test zones with various escape sequences and filesystem seperator
characters.
* escaped double quote (\")
* escaped escape (\\)
* escaped decimal byte value (\032)
* slash seperator (/)

(cherry picked from commit 5ab9b5b1e6)
2020-05-01 09:18:04 +10:00
Mark Andrews 3a79f3629c Check that bad message id's are caught by named
(cherry picked from commit 06e53c9e14)
2020-04-21 09:37:47 +10:00
Mark Andrews 87a22c5705 Convert to using retry_quiet and nextpart
(cherry picked from commit 9937116f21)
2020-04-21 09:33:36 +10:00
Ondřej Surý 5fd1df8cfa Disable MSB8028 warning
All our MSVS Project files share the same intermediate directory.  We
know that this doesn't cause any problems, so we can just disable the
detection in the project files.

Example of the warning:

  warning MSB8028: The intermediate directory (.\Release\) contains files shared from another project (dnssectool.vcxproj).  This can lead to incorrect clean and rebuild behavior.

(cherry picked from commit b6c2012d93)
2020-04-16 08:12:39 +02:00
Ondřej Surý 1eb5a77baa Set WarningLevel to Level1 for Release, treat warnings as errors
Our vcxproj files set the WarningLevel to Level3, which is too verbose
for a code that needs to be portable.  That basically leads to ignoring
all the errors that MSVC produces.  This commits downgrades the
WarningLevel to Level1 and enables treating warnings as errors for
Release builds.  For the Debug builds the WarningLevel got upgraded to
Level4, and treating warnings as errors is explicitly disabled.

We should eventually make the code clean of all MSVC warnings, but it's
a long way to go for Level4, so it's more reasonable to start at Level1.

For reference[1], these are the warning levels as described by MSVC
documentation:

  * /W0 suppresses all warnings. It's equivalent to /w.
  * /W1 displays level 1 (severe) warnings. /W1 is the default setting
    in the command-line compiler.
  * /W2 displays level 1 and level 2 (significant) warnings.
  * /W3 displays level 1, level 2, and level 3 (production quality)
    warnings. /W3 is the default setting in the IDE.
  * /W4 displays level 1, level 2, and level 3 warnings, and all level 4
    (informational) warnings that aren't off by default. We recommend
    that you use this option to provide lint-like warnings. For a new
    project, it may be best to use /W4 in all compilations. This option
    helps ensure the fewest possible hard-to-find code defects.
  * /Wall displays all warnings displayed by /W4 and all other warnings
    that /W4 doesn't include — for example, warnings that are off by
    default.
  * /WX treats all compiler warnings as errors. For a new project, it
    may be best to use /WX in all compilations; resolving all warnings
    ensures the fewest possible hard-to-find code defects.

1. https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=vs-2019

(cherry picked from commit 789d253e3d)
2020-04-16 08:12:39 +02:00
Ondřej SurýandOndřej Surý 9301d69ebc Make the python code pylint and flake8 compliant
(cherry picked from commit 1e4ff9d485)
2020-04-15 07:46:35 +02:00
Diego FronzaandOndřej Surý eace12fb70 Add test for the proposed fix
This test asserts that option "deny-answer-aliases" works correctly
when forwarding requests.

As a matter of example, the behavior expected for a forwarder BIND
instance, having an option such as deny-answer-aliases { "domain"; }
is that when forwarding a request for *.anything-but-domain, it is
expected that it will return SERVFAIL if any answer received has a CNAME
for "*.domain".
2020-04-08 09:21:03 +02:00
Ondřej Surý 9b76eea08f Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:

> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.

The 2 warnings reported are:

byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view')
                RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
                                               ^~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK'
                                                   ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK'
        ((void)(ISC_LIKELY(cond) ||  \
                           ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY'
                                            ^
1 warning generated.

--

./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host')
        if (*host == '/') {
            ^~~~~
1 warning generated.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer

(cherry picked from commit ddd0d356e5)
2020-03-25 18:09:20 +01:00
Mark Andrews 614381a936 wait for the reply message before checking to avoid false negative.
Waiting for the reply message will ensure that all messages being
looked for exist in the logs at the time of checking.  When the
test was only waiting for the send message there was a race between
grep and the ns1 instance of named logging that it had seen the
request.

(cherry picked from commit a38a324442)
2020-03-16 10:52:31 +11:00
Mark Andrews be57cd016c Test reloading of zones with special
(cherry picked from commit ad030332bd)
2020-03-13 15:03:49 +11:00
Mark Andrews 0cf8585b81 Check that dig/host/nslookup handle a UPDATE response.
Additionally check that "delete $qname SOA" in the update
reponse doesn't trigger a insertion in nslookup.

(cherry picked from commit 6593cf0b5a)
2020-03-13 12:17:21 +11:00