Commit graph

51 commits

Author SHA1 Message Date
Evan Hunt
7b2880d191 further tidying of primary/secondary terminology in system tests
this changes most visble uses of master/slave terminology in tests.sh
and most uses of 'type master' or 'type slave' in named.conf files.
files in the checkconf test were not updated in order to confirm that
the old syntax still works. rpzrecurse was also left mostly unchanged
to avoid interference with DNSRPS.

(cherry picked from commit e43b3c1fa1)
2021-01-12 15:21:14 +01:00
Diego Fronza
64ae91c62a Fix dnstap system test on FreeBSD
This commit ensures that dnstap output files captured
by fstrm_capture are properly flushed before any attempt
on reading them with dnstap-read is done.

By reading fstrm-capture source code it was noticed that
signal SIGHUP is used to flush the capture file.
2020-10-20 10:22:50 -03:00
Evan Hunt
df698d73f4 update all copyright headers to eliminate the typo 2020-09-14 16:50:58 -07:00
Michał Kępień
894b7a8345 Use "-T maxcachesize=2097152" in all system tests
In order to lower the amount of memory allocated at startup by named
instances used in the BIND system test suite, set the default value of
"max-cache-size" for these to 2 megabytes.  The purpose of this change
is to prevent named instances (or even entire virtual machines) from
getting killed by the operating system on the test host due to excessive
memory use.

Remove all "max-cache-size" statements from named configuration files
used in system tests ("checkconf" notwithstanding) to prevent confusion
as the "-T maxcachesize=..." command line option takes precedence over
configuration files.

(cherry picked from commit dad6572093)
2020-08-31 23:42:38 +02:00
Michał Kępień
62f631f798 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):
2020-06-30 11:19:47 +10:00
Mark Andrews
bf205b00c3 Check that 'rndc dnstap -roll <value>' works
(cherry picked from commit a289a57c7f)
2020-06-29 22:30:01 +00:00
Mark Andrews
2a45b67ee1 Silence: E741 ambiguous variable name 'l'
(cherry picked from commit 189d21fb96)
2020-05-12 14:06:52 +02:00
Michał Kępień
299954d006 Make dnstap work reliably with netmgr
The introduction of netmgr doubled the number of threads from which
dnstap data may be logged: previously, it could only happen from within
taskmgr worker threads; with netmgr, it can happen both from taskmgr
worker threads and from network threads.  Since the argument passed to
fstrm_iothr_options_set_num_input_queues() was not updated to reflect
this change, some calls to fstrm_iothr_get_input_queue() can now return
NULL, effectively preventing some dnstap data from being logged.
Whether this bug is triggered or not depends on thread scheduling order
and packet distribution between network threads, but will almost
certainly be triggered on any recursive resolver sooner or later.  Fix
by requesting the correct number of dnstap input queues to be allocated.

(cherry picked from commit 77dc091855)
2020-05-01 16:29:18 +02:00
Ondřej Surý
4c4af11e5b Make the python code pylint and flake8 compliant
(cherry picked from commit 1e4ff9d485)
2020-04-15 07:43:35 +02: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
Michał Kępień
d8905b7a9c Automatically run clean.sh from run.sh
The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.
2019-12-06 14:11:01 +01:00
Mark Andrews
f3d53630c3 add more dnstap/dnstap-output combinations 2019-10-21 11:06:21 +11:00
Evan Hunt
33887dd941 add digdelv +yaml system tests 2019-08-25 16:41:38 -07:00
Mark Andrews
a4f38bec6a named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified
2019-07-23 05:09:01 +10:00
Michał Kępień
3549abe81d dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.
2019-06-28 12:43:51 +02:00
Evan Hunt
1f578cdb12 dnstap: if recursion is not available, log queries as AQ instead of CQ 2019-04-11 15:13:13 -07:00
Evan Hunt
fc99651d7d disable QNAME minimization in the dnstap test so packet counts will be correct 2018-11-02 11:34:27 -07:00
Evan Hunt
ae8026171b update system test to add a check for UPDATE messages 2018-10-03 01:03:56 -07:00
Evan Hunt
0d6f504ba3 specify "dnssec-validation yes" instead of default "auto" 2018-08-23 13:52:57 -04:00
Evan Hunt
a7a2fa296a update system tests so validation won't fail when using IANA key
- all tests with "recursion yes" now also specify "dnssec-validation yes",
  and all tests with "recursion no" also specify "dnssec-validation no".
  this must be maintained in all new tests, or else validation will fail
  when we use local root zones for testing.
- clean.sh has been modified where necessary to remove managed-keys.bind
  and viewname.mkeys files.
2018-05-31 18:22:33 +02:00
Tony Finch
286a7b6b9a Allow TTL values when configuring TTLs and time intervals.
Options updated to use ttlvals: max-cache-ttl, max-ncache-ttl,
max-policy-ttl, fstrm-set-reopen-interval, interface-interval, and
min-update-interval.
2018-04-13 11:46:06 -07:00
Ondřej Surý
843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Evan Hunt
0c559199bf final cleanup
- add CHANGES note
- update copyrights and license headers
- add -j to the make commands in .gitlab-ci.yml to take
  advantage of parallelization in the gitlab CI process
2018-02-22 22:58:15 -08:00
Evan Hunt
c032c54dda parallelize most system tests 2018-02-22 15:29:02 -08:00
Mark Andrews
f5d429e7c3 save why ydump.py failed 2017-12-22 16:02:39 +11:00
Evan Hunt
49740fb0f2 [master] add I: when echoing information about failed tests 2017-09-18 14:15:37 -07:00
Tinderbox User
12ed5d34b9 update copyright notice / whitespace 2017-08-04 23:46:19 +00:00
Evan Hunt
61367c604c [master] refactor resquery_response() and related functions
4669.	[func]		Iterative query logic in resolver.c has been
			refactored into smaller functions and commented,
			for improved readability, maintainability and
			testability. [RT #45362]
2017-08-04 16:08:11 -07:00
Evan Hunt
6ce8a05f6c [master] update copyrights that had been missed recently 2017-04-23 17:06:00 -07:00
Evan Hunt
f5c39b072c [master] hex output mode for dnstap-read
4594.	[func]		"dnstap-read -x" prints a hex dump of the wire
			format of each logged DNS message. [RT #44816]
2017-04-20 20:22:19 -07:00
Evan Hunt
6d19d975c6 [master] python 3 compatibility
4591.	[port]		Addressed some python 3 compatibility issues.
			Thanks to Ville Skytta. [RT #44955] [RT #44956]
2017-04-20 17:30:35 -07:00
Evan Hunt
612b2e2c0d [master] timestamp suffixes for log files
4579.	[func]		Logging channels and dnstap output files can now
			be configured with a "suffix" option, set to
			either "increment" or "timestamp", indicating
			whether to use incrementing numbers or timestamps
			as the file suffix when rolling over a log file.
			[RT #42838]
2017-03-08 23:20:40 -08:00
Tinderbox User
f929677ed8 update copyright notice / whitespace 2017-02-08 23:45:32 +00:00
Evan Hunt
d8339932af [master] fix memory leak from dnstap-output parsing 2017-02-06 22:13:51 -08:00
Evan Hunt
c4e4bd6a09 [master] dnstap size and versions options
4572.	[func]		The "dnstap-output" option can now take "size" and
			"versions" parameters to indicate the maximum size
			a dnstap log file can grow before rolling to a new
			file, and how many old files to retain. [RT #44502]
2017-02-06 16:34:58 -08:00
Mark Andrews
813ff2d277 remove #!/usr/bin/python 2016-12-29 23:37:53 +11:00
Mark Andrews
da40ddaeca add copyright notice 2016-12-29 23:10:37 +11:00
wpk
e910d18007 4545. [func] Make dnstap-read output more functionally usable.
[RT #43642]

4544.	[func]		Add message/payload size to dnstap-read YAML output.
			[RT #43622]
2016-12-28 11:57:28 +01:00
Mark Andrews
ed7097fc00 4463. [bug] The dnstap system test failed on some systems.
[RT #43129]
2016-09-08 11:40:24 +10:00
Tinderbox User
4c60000629 update copyright notice / whitespace 2016-08-30 23:45:30 +00:00
Mark Andrews
3e1fa8411b 4460. [test] Add system test for dnstap using unix domain sockets.
[RT #42926]
2016-08-30 11:20:22 +10:00
Mark Andrews
726cddb564 4454. [bug] 'rndc dnstap -reopen' had a race issue. [RT #43089] 2016-08-25 10:03:22 +10:00
Mark Andrews
934837913f 4447. [tuning] Allow the fstrm_iothr_init() options to be set using
named.conf to control how dnstap manages the data
                        flow. [RT #42974]
2016-08-18 11:16:06 +10:00
Evan Hunt
ffa622d7a3 [master] rndc dnstap -roll
4411.	[func]		"rndc dnstap -roll" automatically rolls the
			dnstap output file; the previous version is
			saved with ".0" suffix, and earlier versions
			with ".1" and so on. An optional numeric argument
			indicates how many prior files to save. [RT #42830]
2016-07-13 01:12:47 -07:00
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +10:00
Mark Andrews
8927a982bd update copyrights / whitespace 2016-06-24 16:23:26 +10:00
Mark Andrews
7d262a3647 4394. [func] Add rndc command "dnstap-reopen" to close and
reopen dnstap output filed. [RT #41803]
2016-06-24 09:37:04 +10:00
Tinderbox User
dce54b9b5c update copyright notice / whitespace 2016-06-14 23:45:25 +00:00
Mark Andrews
3635d8f910 do not overflow exit status. [RT #42643] 2016-06-14 13:48:39 +10:00