Commit Graph

2418 Commits

Author SHA1 Message Date
Michał Kępień
dce66f7635 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.

(cherry picked from commit 120af964ce)
2018-06-13 07:58:39 +02:00
Michał Kępień
21d3658bcb Add helper functions for converting keyfile data into configuration sections
Add a set of helper functions for system test scripts which enable
converting key data from a set of keyfiles to either a "trusted-keys"
section or a "managed-keys" section suitable for including in a
resolver's configuration file.

(cherry picked from commit 2392b8bc7d)
2018-06-13 07:58:10 +02:00
Evan Hunt
86787d0ad1 ensure that we attempt to validate glue if it's signed
- incidentally fixed a bug in the dnssec system test where TTLs in the
  answer section rather than the additional section were being checked

(cherry picked from commit 8d923a05a9)
2018-06-08 11:49:34 -07:00
Mukund Sivaraman
a5933fa2bb Add system test 2018-06-08 16:34:29 +10:00
Mark Andrews
1783fa5aba add duplicate signature test
(cherry picked from commit 0db5b087ed)
2018-06-06 17:05:47 +10:00
Evan Hunt
3e1a0c2b62 use "ip" on linux, falling back to "ifconfig" when it isn't available
(cherry picked from commit d7c5400798)
2018-06-05 21:44:45 -07:00
Evan Hunt
e4487b160c expand address range in ifconfig.sh to include more than one subnet
(cherry picked from commit 41b29a436b)
2018-06-05 21:44:45 -07:00
Mukund Sivaraman
ac7c74425e Don't insert 2nd space between NSEC3 nexthash and typemap fields
(cherry picked from commit d4ea1edd2c)
2018-06-04 13:01:18 +10:00
Evan Hunt
59715255cf fix openbsd color-display problem in system test output
(cherry picked from commit 1e31fdb76d)
2018-05-25 13:01:25 -07:00
Evan Hunt
3e57b352be files were left in place after catz run because of non-portable bracket use
(cherry picked from commit af73e16c9c)
2018-05-24 16:18:24 -07:00
Evan Hunt
61de568197 copyrights 2018-05-23 09:52:09 -07:00
Mark Andrews
8ad96c7a76 add HOME.ARPA to the list of empty zones
(cherry picked from commit 10dd0b3efe)
2018-05-23 11:13:10 +10:00
Mark Andrews
a14ecc9e46 fix handling of failed tests
(cherry picked from commit 4283f9552f)
2018-05-23 11:08:14 +10:00
Mukund Sivaraman
d6a4760031 Add system test
(cherry picked from commit 303391ea41)
2018-05-16 08:29:25 +02:00
Ondřej Surý
c35de9b383 Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:19:35 +02:00
Ondřej Surý
1c003f1230 Update tests to not use '>&-' that closes file descriptor, but instead use correct redirection to '>/dev/null'
(cherry picked from commit 3f66b8acb0)
2018-05-11 13:11:10 +02:00
Ondřej Surý
fa846bbed0 Address GCC 8 -Wstringop-truncation warning
(cherry picked from commit 9845c4c4a7)
2018-05-10 10:52:00 +02:00
Mark Andrews
03e4dc4c6b add dnssec prerequisite test to rootkeysentinel
(cherry picked from commit e713f83064)
2018-05-03 16:42:47 +02:00
Michał Kępień
8a58a60772 Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.

(cherry picked from commit 6acf326969)
2018-04-25 12:09:04 -07:00
Mark Andrews
b9e6b124aa add system test for root-key-sentinel
(cherry picked from commit a23b305e6b)
2018-04-22 12:46:03 -07:00
Michał Kępień
0041aeb751 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.

(cherry picked from commit 4df4a8e731)
2018-04-10 13:09:24 -07:00
Kevin Chen
a8d7b3a12b Add a Net::DNS prereq for digdelv, fetchlimit, rpzrecurse, and zero
tests to avoid failed tests when Net::DNS is not present.

(cherry picked from commit 8b1b809ab4)
2018-04-04 23:00:56 +02:00
Stephen Morris
7f6d484d76 Check libidn2 version before proceding with one of the tests.
A known issue in libidn2 causes one of the tests of a fake A-label
to fail.  The problem should be corrected in version 2.0.5 of
libidn2.
2018-04-04 09:47:53 -04:00
Ondřej Surý
5b9975e38f Use C.UTF-8 if available, and en_US.UTF-8 is available, otherwise do nothing and let the test break 2018-04-04 09:47:53 -04:00
Stephen Morris
5633f8afda Set known locale prior to running tests. 2018-04-04 09:47:53 -04:00
Stephen Morris
38fe1ce60f Fix check for the presence of IDNA. 2018-04-04 09:47:53 -04:00
Stephen Morris
5f00b9dad7 Added additional tests for invalid punycode strings. 2018-04-04 09:47:53 -04:00
Stephen Morris
2df1a2ef20 Initial set of IDNA tests. 2018-04-04 09:47:53 -04:00
Mark Andrews
da23698286 fix temporary file name to have subtest number
(cherry picked from commit e12453f43c88bac722fb511b62f12303735b788c)
2018-03-19 23:13:44 +11:00
Mark Andrews
a296346e48 fix typo
(cherry picked from commit 6e4b5f2345)
2018-03-19 22:51:13 +11:00
Mark Andrews
d4978012c2 fix numbering of tests and make consistent
(cherry picked from commit dd5dff3096)
2018-03-19 20:19:07 +11:00
Evan Hunt
19b5249028 update file headers 2018-03-15 18:40:21 -07:00
Evan Hunt
b52199271a clean up dig.out files that were left behind after xfer test
(cherry picked from commit 733086cc67)
2018-03-10 13:12:20 -08:00
Evan Hunt
11ab3146e7 fix copyrights 2018-03-09 16:52:56 -08:00
Evan Hunt
7f4e62d902 reduce race risk in parallel builds
(cherry picked from commit 74347f4a55)
2018-03-09 14:40:10 -08:00
Evan Hunt
d8f8eee381 migrate tests from bin/tests/dnssec-signzone to bin/tests/system/dnssec
- added tests to the dnssec system test that duplicate the ones
  from bin/tests/dnssec-signzone
- changed cleanall.sh so it doesn't automatically remove all
  key files, because there are now some of those that are part of the
  distribution

(cherry picked from commit ccfe778c01)
2018-03-09 14:39:55 -08:00
Michał Kępień
be1262c066 Tweak timestamp checking in the cds system test
Given the characteristics of the three timestamps involved in file
modification time checks in the cds system test (each one is an hour
apart from the next), reduce the resolution of these checks to 1 minute.
This will prevent intermittent false negatives caused by exceeding the
currently allowed difference of 9 seconds between file modification
times without making the test moot.

Also note that by using abs(), checkmtime.pl allows the cds system test
to pass when the modification time of the checked file is less than an
hour (or two hours for the second check) in the past.  This should never
happen, so remove abs() from the condition checked by checkmtime.pl.

(cherry picked from commit ab2913a29f)
2018-03-08 21:00:56 +01:00
Michał Kępień
8e01609014 Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.

(cherry picked from commit 012ca0a27d)
2018-03-08 13:35:33 +01:00
Mark Andrews
119f626ffa add test configuration where a in-view zone collides with a existing zone
(cherry picked from commit ca55c672b0)
2018-03-08 12:09:03 +11:00
Evan Hunt
105c8a8cd3 use the test name in the -D string for each name server
(cherry picked from commit 1eff695f33)
2018-03-07 14:51:06 -08:00
Evan Hunt
602533aace restore long options for run.sh
(cherry picked from commit 4a714bffbc)
2018-03-07 14:35:24 -08:00
Evan Hunt
f8d096ec3c Merge branch 'allow-query' into 'v9_12'
speed up allow_query test

Closes #81

See merge request isc-projects/bind9!76
2018-03-07 14:20:05 -08:00
Evan Hunt
bbbf2418e9 eliminate unnecessary waiting in allow-query test
- grep in the log to see if configuration is finished rather
  than sleeping for 5 seconds

(cherry picked from commit a9b6bed6af)
2018-03-07 13:59:32 -08:00
Evan Hunt
f6f6a80c4a rename allow_query to allow-query
(cherry picked from commit ffc3e73c36)
2018-03-07 13:59:32 -08:00
Evan Hunt
ad32553c1d address a possible notify test failure
- wait for the transfer completion message to apear in the log instead
  of the notify message. this ensures we don't check for the presense of
  transfered records during the time between the notify and the
  transfer.
2018-03-06 11:45:43 -08:00
Evan Hunt
8011165d76 revise soft limit test
- don't bail out of the loop if clients are exceeded, just count incidents
- verbosely describe expectations and results

(cherry picked from commit 86838b2a02)
2018-03-01 15:40:50 +01:00
Mark Andrews
dd1579877f wait for 'all zones loaded' rather than 'reloading zones succeeded' which just indicates that everything kicked off ok
(cherry picked from commit 4cb0873a0a)
2018-02-28 14:55:47 +01:00
Evan Hunt
fe8bec4b31 Do not destroy systests.output if there are no test.output files
(cherry picked from commit 38940619c6)
2018-02-27 10:04:13 -08:00
Michał Kępień
791f26b2c9 Use echoinfo for printing test summary
This ensures testsummary.sh is consistent with other scripts belonging
to the test framework.

(cherry picked from commit 642e20db8a)
2018-02-27 10:04:13 -08:00
Michał Kępień
3bd658f561 Make testsummary.sh print a list of failed system tests
Print a list of failed system tests, if any, below the system test
summary to avoid the need to manually search through the test log.

(cherry picked from commit 28068857e7)
2018-02-27 10:04:13 -08:00