Commit graph

41 commits

Author SHA1 Message Date
Evan Hunt
0ef5b8edb7 rename keyfile_to_*_keys system test shell functions
- keyfile_to_trusted_keys -> keyfile_to_static_keys
- keyfile_to_managed_keys -> keyfile_to_initial_keys
2019-06-05 07:49:57 -07:00
Evan Hunt
821f041d8c "dnssec-keys" is now a synonym for "managed-keys"
- managed-keys is now deprecated as well as trusted-keys, though
  it continues to work as a synonym for dnssec-keys
- references to managed-keys have been updated throughout the code.
- tests have been updated to use dnssec-keys format
- also the trusted-keys entries have been removed from the generated
  bind.keys.h file and are no longer generated by bindkeys.pl.
2019-06-05 07:49:57 -07:00
Evan Hunt
a00e54cf0e revise system tests to use "static-key" syntax instead of "trusted-keys" 2019-06-05 07:49:57 -07:00
Michał Kępień
47b850348c Optimize dig parameters to decrease test run time
Performing server setup checks using "+tries=3 +time=5" is redundant as
a single query is arguably good enough for determining whether a given
named instance was set up properly.  Only use multiple queries with a
long timeout for resolution checks in the "legacy" system test, in order
to significantly reduce its run time (on a contemporary machine, from
about 1m45s to 0m40s).
2019-05-29 11:05:01 +02:00
Michał Kępień
bb939a03ff Make "plain" server setup checks more similar
Send a test TCP query to the "plain" server during its setup check to
improve its consistency with the setup check for the "plain + no TCP"
server.
2019-05-29 11:05:01 +02:00
Michał Kępień
56ed1275c6 Add more EDNS checks for dig output files
In the "legacy" system test, in order to make server setup checks more
consistent with each other, add further checks for either presence or
absence of the EDNS OPT pseudo-RR in the responses returned by the
tested named instances.
2019-05-29 11:05:01 +02:00
Michał Kępień
4dea5cb799 Do not ignore dig exit codes
Make sure the "legacy" system test fails if any exit code returned by
dig does not match the expected one.
2019-05-29 11:05:01 +02:00
Michał Kępień
effd16ab25 Use helper functions for checking resolution
Extract repeated dig and grep calls into two helper shell functions,
resolution_succeeds() and resolution_fails(), in order to reduce code
duplication in the "legacy" system test, emphasize the similarity
between all the resolution checks in that test, and make the conditions
for success and failure uniform for all resolution checks in that test.
2019-05-29 11:05:01 +02:00
Michał Kępień
aaf81ca6ef Use +dnssec instead of separate TXT records
When testing named instances which are configured to drop outgoing UDP
responses larger than 512 bytes, querying with DO=1 may be used instead
of querying for large TXT records as the effect achieved will be
identical: an unsigned response for a SOA query will be below 512 bytes
in size while a signed response for the same query will be over 512
bytes in size.  Doing this makes all resolution checks in the "legacy"
system test more similar.  Add checks for the TC flag being set in UDP
responses which are expected to be truncated to further make sure that
tested named instances behave as expected.
2019-05-29 11:05:01 +02:00
Michał Kępień
3e7fa15ca3 Fix the name of the file to inspect
One of the checks in the "legacy" system test inspects dig.out.1.test$n
instead of dig.out.2.test$n.  Fix the file name used in that check.
2019-05-29 11:05:01 +02:00
Michał Kępień
6283c1cc7e Ensure queries expected to time out really do
Make sure that the "legacy" system test fails if queries which are
expected to time out do not really time out.
2019-05-29 11:05:01 +02:00
Michał Kępień
9491616e5c Properly test servers with TCP support disabled
Sending TCP queries to test named instances with TCP support disabled
should cause dig output to contain the phrase "connection refused", not
"connection timed out", as such instances never open the relevant
sockets.  Make sure that the "legacy" system test fails if the expected
phrase is not found in any of the relevant files containing dig output.
2019-05-29 11:05:01 +02:00
Michał Kępień
b6cce0fb8b Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.
2019-04-03 12:57:33 +02:00
Evan Hunt
175d6e9bfb add properly-formatted -D options to named.args files
this prevents servers that use arguments specified in named.args
from appearing different in 'ps' output from servers run with arguments
from start.pl
2019-01-28 19:58:24 -08:00
Evan Hunt
8acc3434a7 fix legacy test
use rndc rather than signals to stop the server
2019-01-25 00:44:11 -08:00
Ondřej Surý
e227815af5 Make calls to the stop.pl always use the test name instead of '.' 2018-12-03 16:24:09 +01:00
Ondřej Surý
16b95157e8 Make calls to the start.pl always use the test name instead of '.' 2018-12-03 15:50:21 +01:00
Mark Andrews
615ebc39e3 remove EDNS workarounds, update legacy test 2018-08-30 21:17:00 -07:00
Ondřej Surý
c40425d0f6 RSA and ECDSA cryptography is now mandatory; remove the checks for those 2018-07-19 12:47:03 -04:00
Michał Kępień
120af964ce Replace duplicated code snippet with calls to helper functions
Reduce code duplication by replacing a code snippet repeated throughout
system tests using "trusted-keys" and/or "managed-keys" configuration
sections with calls to keyfile_to_{managed,trusted}_keys() helper
functions.
2018-06-13 07:57:40 +02: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
Ondřej Surý
2b8fab6828 Remove genrandom command and all usage of specific random files throughout the system test suite 2018-05-16 09:54:35 +02:00
Evan Hunt
0e52fbd0b3 clean up test output
- removed a few remaing places where output wasn't being passed
  through echo_i or cat_i
- added a "digcomp" function to conf.sh.in to send digcomp.pl output
  through cat_i and return the correct exit value
- set SYSTESTDIR when calling echo_i from nsX directories, so that
  the test name will always be printed correctly
- fixed a test name typo in conf.sh.in
2018-02-26 23:37:05 -08: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
Evan Hunt
6ce8a05f6c [master] update copyrights that had been missed recently 2017-04-23 17:06:00 -07:00
Mukund Sivaraman
dd7d1df874 Increase minimum RSA keygen size to 1024 bits (#36895) 2017-04-21 12:00:40 +05:30
Mark Andrews
0c27b3fe77 4401. [misc] Change LICENSE to MPL 2.0. 2016-06-27 14:56:38 +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
Mark Andrews
82c6bce26a ignore dig's result when expecting 'connection timed out' 2015-02-12 13:44:30 +11:00
Tinderbox User
f6bc0a8608 update copyright notice / whitespace 2015-02-11 23:45:25 +00:00
Mark Andrews
2ff2145ff5 4061. [bug] Handle timeout in legacy system test. [RT #38573] 2015-02-11 16:53:39 +11:00
Mukund Sivaraman
47d837a499 Make named a singleton process [RT#37908]
Conflicts:
	bin/tests/system/conf.sh.in
	lib/dns/win32/libdns.def.in
	lib/isc/win32/file.c

The merge also needed to update files in legacy and tcp system tests
(newly introduced in master after branch was created) to introduce use
of lockfile.
2014-12-18 12:31:25 +05:30
Mark Andrews
39a5e136fb skip subtest if cryptography not compiled in 2014-12-06 00:48:52 +11:00
Mark Andrews
017aa9aef6 4019. [func] If named is not configured to validate the answer
then allow fallback to plain DNS on timeout even
                        when we know the server supports EDNS. [RT #37978]
2014-12-05 17:47:26 +11:00
Mark Andrews
12065c231e clean up intermediates 2014-12-05 08:28:15 +11:00
Mark Andrews
76b242bb77 pre-sign the zones 2014-12-05 07:28:29 +11:00
Tinderbox User
b9097be03b update copyright notice / whitespace 2014-12-03 23:45:24 +00:00
Mark Andrews
693d70f96f 4017. [testing] Add system test to check lookups to legacy servers
with broken DNS behaviour. [RT #37965]
2014-12-04 07:01:52 +11:00