Commit graph

2937 commits

Author SHA1 Message Date
Ondřej Surý
c2dad0dcb2 Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().
2019-10-01 10:43:26 +10:00
Ondřej Surý
89b269b0d2 Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
This second commit uses second semantic patch to replace the calls to
dns_name_copy() with NULL as third argument where the result was stored in a
isc_result_t variable.  As the dns_name_copy(..., NULL) cannot fail gracefully
when the third argument is NULL, it was just a bunch of dead code.

Couple of manual tweaks (removing dead labels and unused variables) were
manually applied on top of the semantic patch.
2019-10-01 10:43:26 +10:00
Ondřej Surý
c42e3583f9 Test of valid A-label in locale that cannot display it only with non-broken idn2
The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't
fail when it should.  This commit ensures that we don't run the system test for
valid A-label in locale that cannot display with the buggy libidn2 as it would
break the tests.
2019-09-30 11:47:39 +02:00
Petr Menšík
ac0cf85f09 Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.
2019-09-30 08:52:13 +02:00
Michał Kępień
4deb2a48d9 Fix the "statschannel" system test on Windows
The SYSTEMTESTTOP variable is set by bin/tests/system/run.sh.  When
system tests are run on Windows, that variable will contain an absolute
Cygwin path.  In the case of the "statschannel" system test, using the
unmodified SYSTEMTESTTOP variable in tests.sh causes the RNDCCMD
variable to contain an invocation of a native Windows application with
an absolute Cygwin path passed as a parameter, which prevents rndc from
working in that system test.  Until we have a cleaner solution, override
SYSTEMTESTTOP with a relative path to work around the issue and thus fix
the "statschannel" system test on Windows.
2019-09-26 15:11:15 +02:00
Michał Kępień
fed397c04b Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.
2019-09-26 15:11:15 +02:00
Michał Kępień
0476e8f1ac Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.
2019-09-26 15:11:15 +02:00
Mark Andrews
4a5400c1b7 use test specific shell variables 2019-09-26 03:30:43 -04:00
Ondřej Surý
4957255d13 Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
Mark Andrews
2433e3e808 allow VSCONF to be overridden at runtime 2019-09-05 14:31:04 +10:00
Mark Andrews
2390d16955 silence dos2unix messages 2019-09-04 10:04:14 +10:00
Diego dos Santos Fronza
bc53d68ae6 Added documentation for dig's +unexpected command line option. 2019-09-03 10:15:25 -03:00
Evan Hunt
3ef91562f1 add a toy name server that replies from the wrong address 2019-09-03 10:14:15 -03:00
Evan Hunt
7ba6d592ec when a response-policy zone expires, unload its polices from RPZ summary 2019-08-30 11:47:38 -07:00
Matthijs Mekking
d0dc720d7d Add missing n increments in checkconf test 2019-08-30 12:27:24 +02:00
Ondřej Surý
50e109d659 isc_event_allocate() cannot fail, remove the fail handling blocks
isc_event_allocate() calls isc_mem_get() to allocate the event structure.  As
isc_mem_get() cannot fail softly (e.g. it never returns NULL), the
isc_event_allocate() cannot return NULL, hence we remove the (ret == NULL)
handling blocks using the semantic patch from the previous commit.
2019-08-30 08:55:34 +02:00
Mark Andrews
70dd93bf8a don't escape commas when saving named's command line 2019-08-29 20:16:33 -04:00
Mark Andrews
d98f446d3f Add support for displaying EDNS option LLQ. 2019-08-28 16:13:43 +10:00
Mark Andrews
30610eb9a5 add good and bad CDS / CDNSKEY test zones 2019-08-28 15:46:41 +10:00
Mark Andrews
3705605e0b fix dnssec system tests that fail now that we call dns_zone_cdscheck 2019-08-28 15:46:41 +10:00
Evan Hunt
7b65ea4c11 remove unneeded files and options from glue test
- the cache-file and check-itegrity options were not needed
- some zones and files were not used
2019-08-27 09:41:33 -07:00
Evan Hunt
33887dd941 add digdelv +yaml system tests 2019-08-25 16:41:38 -07:00
Matthijs Mekking
98b460e604 Add serve-stale test for ancient RRsets counters 2019-08-12 10:16:08 +02:00
Matthijs Mekking
a3af2c57e7 Make rbtdb maintain stale counters
When updating the statistics for RRset types, if a header is marked
stale or ancient, the appropriate statistic counters are decremented,
then incremented.

Also fix some out of date comments.
2019-08-12 10:16:08 +02:00
Evan Hunt
efa5f7ed54 remove remaining DLV-related configuration checks 2019-08-09 09:22:05 -07:00
Evan Hunt
54de054dd5 mark 'dnssec-lookaside' obsolete in parser 2019-08-09 09:18:02 -07:00
Evan Hunt
2c87ab1cca remove DLV system tests 2019-08-09 09:18:02 -07:00
Evan Hunt
0b2b6b2ed1 remove DLV support from dnssec-checkds 2019-08-09 09:18:02 -07:00
Michał Kępień
4a8b3a8ac0 Use rndc_dumpdb() in the "sfcache" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
52beeed444 Use rndc_dumpdb() in the "serve-stale" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
443449863b Use rndc_dumpdb() in the "rndc" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
44c0cc881f Use rndc_dumpdb() in the "dnssec" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
cbf32b901b Use rndc_dumpdb() in the "cookie" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
22d5355782 Use rndc_dumpdb() in the "cacheclean" system test 2019-08-08 14:27:55 +02:00
Michał Kępień
ab78e350dd Implement a convenience function for "rndc dumpdb"
Add a helper shell function, rndc_dumpdb(), which provides a convenient
way to call "rndc dumpdb" for a given server with optional additional
arguments.  Since database dumping is an asynchronous process, the
function waits until the dump is complete before returning, which
prevents false positives in system tests caused by inspecting the dump
before its preparation is finished.  The function also renames the dump
file before returning so that it does not get overwritten by subsequent
calls; this retains forensic data in case of an unexpected test failure.
2019-08-08 14:27:55 +02:00
Evan Hunt
93ad3eea90 added "mdig +multi +norrcomment" test; also fixed the flawed dig test 2019-08-07 19:55:20 -07:00
Mark Andrews
4293a2f4bf check that example/DS is not fetched when validating a.example 2019-08-02 15:09:42 +10:00
Ondřej Surý
2b632a232f Convert the configure.ac rules for zlib library to use pkg-config 2019-07-31 14:54:40 +02:00
Mark Andrews
a7ec7eb6ed check that bits 64..71 in a dns64 prefix are zero 2019-07-31 21:51:11 +10:00
Michał Kępień
dd430c3093 Make root hints consistent with authoritative data
Multiple resolvers in the "wildcard" system test are configured with a
single root hint: "ns.root-servers.nil", pointing to 10.53.0.1, which is
inconsistent with authoritative data served by ns1.  This may cause
intermittent resolution failures, triggering false positives for the
"wildcard" system test.  Prevent this from happening by making ns2, ns3,
and ns5 use root hints corresponding to the contents of ns1/root.db.in.
2019-07-31 11:06:34 +02:00
Ondřej Surý
4b44351e65 The BIND 9 libraries are now internal-only, so remove isc-config.sh
The isc-config.sh script was introduced before pkg-config as is a purely
historical thing.  There are two reason for removal of isc-config.sh scripts:

a) The BIND 9 libraries are now meant to be used only from BIND 9, so there's no
   reason to provide convenience script to link with the libraries.

b) Even if that was not the case, we should and would replace the isc-config.sh
   with respective pkg-config (.pc) file for every library.
2019-07-31 10:45:18 +02:00
Ondřej Surý
94354d4655 Remove 2>&1 from the dnssec-signzone invocation in tests 2019-07-31 10:05:52 +02:00
Michał Kępień
4b5e1da0e3 Make root hints consistent with authoritative data
The ns2 named instance in the "staticstub" system test is configured
with a single root hint commonly used in BIND system tests
(a.root-servers.nil with an address of 10.53.0.1), which is inconsistent
with authoritative data served by ns1.  This may cause intermittent
resolution failures, triggering false positives for the "staticstub"
system test.  Prevent this from happening by making ns1 serve data
corresponding to the contents of bin/tests/system/common/root.hint.
2019-07-31 09:18:02 +02:00
Mark Andrews
9836d5bc17 check that dig +short +expandaaaa works 2019-07-30 21:05:56 -04:00
Michał Kępień
bb9c1654e2 Fix awk invocation in the "verify" system test
Appending output of a command to the same file as the one that command
is reading from is a dangerous practice.  It seems to have accidentally
worked with all the awk implementations we have tested against so far,
but for BusyBox awk, doing this may result in the input/output file
being written to in an infinite loop.  Prevent this from happening by
redirect awk output to a temporary file and appending its contents to
the original file in a separate shell pipeline.
2019-07-30 21:25:18 +02:00
Michał Kępień
b10d28d1e0 Extend prerequisites for the "xfer" system test
The Net::DNS Perl module needs the Digest::HMAC module to support TSIG.
However, since the latter is not a hard requirement for the former, some
packagers do not make Net::DNS depend on Digest::HMAC.  If Net::DNS is
installed on a host but Digest::HMAC is not, the "xfer" system test
breaks in a very hard-to-debug way (ans5 returns TSIG RRs with empty
RDATA, which prevents TSIG-signed SOA queries and transfers from
working).  Prevent this from happening by making the "xfer" system test
explicitly require Digest::HMAC apart from Net::DNS.
2019-07-30 21:25:18 +02:00
Michał Kępień
266e3ed52a Make "digdelv" system test work with BusyBox sed
The BusyBox version of sed treats leading '\+' in a regular expression
to be matched as a syntax error ("Repetition not preceded by valid
expression"), which triggers false positives for the "digdelv" system
test.  Make the relevant sed invocations work portably across all sed
implementations by removing the leading backslash.
2019-07-30 21:25:18 +02:00
Michał Kępień
ad008f7dbf Make "autosign" system test work with BusyBox awk
The BusyBox version of awk treats some variables which other awk
implementations consider to be decimal values as octal values.  This
intermittently breaks key event interval calculations in the "autosign"
system test, trigger false positives for it.  Prevent the problem from
happening by stripping leading zeros from the affected awk variables.
2019-07-30 21:25:18 +02:00
Michał Kępień
c19ebde14b Make root hints consistent with authoritative data
Resolvers in the "filter-aaaa" system test are configured with a single
root hint: "ns.rootservers.net", pointing to 10.53.0.1.  However,
querying ns1 for "ns.rootservers.net" results in NXDOMAIN answers.
Since the TTL for the root hint is set to 0, it may happen that a
resolver's ADB will be asked to return any known addresses for
"ns.rootservers.net", but it will only have access to a cached NXDOMAIN
answer for that name and an expired root hint, which will result in a
resolution failure, triggering a false positive for the "filter-aaaa"
system test.  Prevent this from happening by making all the root hints
consistent with authoritative data served by ns1.
2019-07-29 21:44:31 +02:00
Matthijs Mekking
4b40266a1d The 'addzone' test ignored some test results 2019-07-25 16:30:20 +02:00