Stephen Morris [Fri, 26 Jan 2018 19:42:57 +0000 (19:42 +0000)]
[rt46602] Changes to get tests running on Windows
1. Track changes to conf.sh.in in conf.sh.win32
2. Modifications to prevent Windows "Configure" script replacing
the sed "@PORT@" substitution tokens in conf.sh.win32.
3. runall.sh now runs Windows tests sequentially
Stephen Morris [Thu, 15 Feb 2018 15:55:57 +0000 (15:55 +0000)]
[rt46602] Change name of shell variable holding current test directory
It was TESTNAME, but this is an obvious name and was used in one of
the system tests, something that interfered with the content of
progress messages. It is now SYSTESTDIR.
Michał Kępień [Fri, 26 Jan 2018 12:46:46 +0000 (13:46 +0100)]
[rt46602] Re-add clean.sh invocation to catz/setup.sh
Commit 57aa7b60fd caused catz/setup.sh to no longer call clean.sh, which
results in the catz system test failing on subsequent runs if the first
run is interrupted or fails.
Stephen Morris [Thu, 25 Jan 2018 14:45:49 +0000 (14:45 +0000)]
[rt46602] Escape line ends in shell script variable assignment
Escape the line ends in a multi-line variable assignment. Under some
circumstances, substituting the variable caused syntax errors when
used as the list of values in a shell script "for" statement.
Stephen Morris [Fri, 15 Dec 2017 15:56:33 +0000 (15:56 +0000)]
[rt46602] Ensure test output in systests.output is not mixed up
When running all the system tests, output from a test is sent to a
test.output file in the test directory. These are combined in to
systests.output when the run finishes.
Stephen Morris [Thu, 23 Nov 2017 10:02:15 +0000 (10:02 +0000)]
[rt46602] Tidy up run management
Miscellaneous tidying up of run management. The most significant
change is that "runall.sh" now runs _all_ the tests, even the
ones that can run in parallel. runsequential.sh is the script
to run tests that have not been converted to parallel running.
Stephen Morris [Thu, 23 Nov 2017 09:58:57 +0000 (09:58 +0000)]
[rt46602] Assign block of ports for each test
Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.
Stephen Morris [Fri, 17 Nov 2017 17:29:21 +0000 (17:29 +0000)]
[rt46602] Miscellaneous changes to existing parallelised tests
Currently these tests are allow_query, rpzrecurse and serve-stale
1. Function to copy files and set port numbers renamed from copy_config
to copy_setports, as this is used to change the ports in Perl and Python
test scripts as well.
2. Changes to rpzrecurse/tests.sh to handle two calls to getopts (one to
parse port numbers, the other to parse rpzrecurse-specific options). Also
fixed various commands to use correct ports.
3. Updates to "clean.sh" scripts to ensure that all files created in the
test are removed.
Stephen Morris [Fri, 17 Nov 2017 13:21:05 +0000 (13:21 +0000)]
[rt46602] Ensure that tests running in parallel use unique ports
Via an intermediate make file, tests that have been modified to be able
to run in parallel are assigned unique query and control port numbers
(other than 5300 and 9953 respectively). Tests that have not yet been
modified all use ports 5300 and 9953, so must be run sequentially.
Michał Kępień [Mon, 5 Feb 2018 20:04:39 +0000 (21:04 +0100)]
Make dns_dt_send() call dns_dt_reopen() asynchronously
Instead of checking current dnstap output file size and potentially
synchronously calling dns_dt_reopen() upon every call to dns_dt_send():
- call dns_dt_reopen() asynchronously by queuing an event to the task
specified at dnstap environment creation time,
- ensure no roll event is outstanding before checking dnstap output
file size and potentially queuing another roll event.
This causes dnstap output files to exceed their configured size limits,
but prevents any two threads from performing the roll simultaneously
(which causes crashes).
Michał Kępień [Mon, 5 Feb 2018 20:22:53 +0000 (21:22 +0100)]
Make dns_dt_reopen() request task-exclusive mode on its own
Instead of relying on the caller to set up task-exclusive mode, make
dns_dt_reopen() enforce task-exclusive mode itself, using the task
specified at dnstap environment creation time.
Michał Kępień [Mon, 5 Feb 2018 20:19:44 +0000 (21:19 +0100)]
Add dns_dt_create2()
Implement a new variant of dns_dt_create() to enable a dnstap
environment structure to hold the task in the context of which
dns_dt_reopen() will be executed.