Commit graph

26122 commits

Author SHA1 Message Date
Michał Kępień
bdf0287c2d 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:43:34 +01:00
Mark Andrews
479ba17e93 Merge branch '133-update-util-check-changes-to-work-on-release-branches-v9_11' into 'v9_11'
Resolve "Update util/check-changes to work on release branches."

Closes #133

See merge request isc-projects/bind9!110
2018-03-08 16:19:42 +11:00
Mark Andrews
86e95f7efd update util/check-changes to handle non master branched (util/check-changes master=0 CHANGES)
(cherry picked from commit 88a2202093)
2018-03-08 16:19:41 +11:00
Mark Andrews
8543e4fc3f fix changes number
(cherry picked from commit 586b547a7d)
2018-03-08 12:40:58 +11:00
Mark Andrews
098d1052b1 Merge branch '125-in-view-duplicate-zone-not-detected-by-named-checkconf-v9_11' into 'v9_11'
Resolve "in-view duplicate zone not detected by named-checkconf"

Closes #125

See merge request isc-projects/bind9!97
2018-03-08 12:21:14 +11:00
Mark Andrews
8843c936bb add changes note for 'named-checkconf did not detect in-view zone collisions'
(cherry picked from commit 83f85817aa)
2018-03-08 12:21:04 +11:00
Mark Andrews
229e9e2215 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name
(cherry picked from commit 3e7e280040)
2018-03-08 12:20:59 +11:00
Mark Andrews
cb0a385692 add test configuration where a in-view zone collides with a existing zone
(cherry picked from commit ca55c672b0)
2018-03-08 12:16:24 +11:00
Evan Hunt
c30f0875de Merge branch 'test-names-v9_11' into 'v9_11'
use the test name in the -D string for each name server

See merge request isc-projects/bind9!107
2018-03-07 14:51:09 -08:00
Evan Hunt
b28dcef84b use the test name in the -D string for each name server
(cherry picked from commit 1eff695f33)
2018-03-07 14:51:09 -08:00
Evan Hunt
dd3d6e65e9 Merge branch 'longopts-v9_11' into 'v9_11'
restore long options for run.sh

See merge request isc-projects/bind9!104
2018-03-07 14:35:31 -08:00
Evan Hunt
223a646d54 restore long options for run.sh
(cherry picked from commit 4a714bffbc)
2018-03-07 14:35:30 -08:00
Evan Hunt
9ef3bb9751 Merge branch 'allow-query' into 'v9_11'
speed up allow_query test

Closes #81

See merge request isc-projects/bind9!76
2018-03-07 14:20:15 -08:00
Evan Hunt
37a6bb004c 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 14:06:32 -08:00
Evan Hunt
5d9e3f9b02 rename allow_query to allow-query
(cherry picked from commit ffc3e73c36)
2018-03-07 14:04:48 -08:00
Evan Hunt
82a3c61fc2 Merge branch 'fix-notify' into 'v9_11'
fix notify test

See merge request isc-projects/bind9!77
2018-03-06 11:46:37 -08:00
Evan Hunt
dff94add3e 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.

(cherry picked from commit ad32553c1d)
2018-03-06 11:46:26 -08:00
Michał Kępień
b40cf385d1 Merge branch '110-libirs-do-not-ignore-resolv.conf-syntax-errors-v9_11' into 'v9_11'
libirs: Do not ignore resolv.conf syntax errors

Closes #110

See merge request isc-projects/bind9!78
2018-03-06 09:24:54 +01:00
Michał Kępień
6bcb8e3502 Add CHANGES entry
4905.	[bug]		irs_resconf_load() ignored resolv.conf syntax errors
			when "domain" or "search" options were present in that
			file. [GL #110]

(cherry picked from commit 1f18d33804)
2018-03-06 09:24:52 +01:00
Michał Kępień
8f07fb476b Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.

(cherry picked from commit 6c09f305ae)
2018-03-06 09:24:41 +01:00
Michał Kępień
b4a10e77ea Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.

(cherry picked from commit 1f400b68a8)
2018-03-06 09:24:41 +01:00
Mark Andrews
b7deabcdf1 Merge branch '126-make-distclean-fail-v9_11' into 'v9_11'
Resolve ""make distclean" fail."

Closes #126

See merge request isc-projects/bind9!102
2018-03-06 16:11:43 +11:00
Mark Andrews
29a95f0d83 don't allow a macro to end in '\'
(cherry picked from commit 57f7cf211c)
2018-03-06 16:11:42 +11:00
Evan Hunt
58b961b19d Merge branch 'test-fix' into v9_11
Fix merge errors in addzone test
2018-03-04 00:34:08 -08:00
Evan Hunt
421c9eff41 fix addzone merge errors 2018-03-04 00:33:50 -08:00
Evan Hunt
7096e76308 Merge branch '124-revert-deadlock-check-v9_12-v9_11' into 'v9_11'
revert cname loop test due to effects on apex CNAMEs under insecure delegations

See merge request isc-projects/bind9!95
2018-03-02 12:02:52 -08:00
Evan Hunt
95c01ddde2 temporarily revert change #4859
(cherry picked from commit 84ec07999f)
2018-03-02 12:02:49 -08:00
Michał Kępień
dd7a65cb17 Merge branch 'fix-fetchlimit-v9_11' into 'v9_11'
Improve failure logging in fetchlimit system test

See merge request isc-projects/bind9!81
2018-03-01 15:40:57 +01:00
Evan Hunt
61f39c70d5 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:57 +01:00
Michał Kępień
c49d45e9f7 Merge branch '118-bind-9-10-cookie-system-test-failing-v9_11' into 'v9_11'
Fix cookie system test for BIND 9.10

See merge request isc-projects/bind9!84
2018-03-01 14:15:55 +01:00
Mark Andrews
3ebcbe5233 remove unnecessary copy_setports calls
(cherry picked from commit d4040783f4)
2018-03-01 14:15:48 +01:00
Michał Kępień
2f3c767305 Merge branch '122-bind-9-10-nsupdate-system-test-fails-v9_11' into 'v9_11'
Fix nsupdate system test for BIND < 9.12

See merge request isc-projects/bind9!89
2018-03-01 13:55:33 +01:00
Mark Andrews
8cf5dd031d remove unsupported command line argument (-4) from nsupdate call
(cherry picked from commit ac3d2a0ed9)
2018-03-01 13:55:33 +01:00
Michał Kępień
ebb0199e1e Merge branch '121-views-system-test-has-wrong-test-strings-for-reload-completion-v9_11' into 'v9_11'
Resolve "views system test has wrong test strings for reload completion."

Closes #121

See merge request isc-projects/bind9!88
2018-02-28 14:56:25 +01:00
Mark Andrews
75b8698f39 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:56:25 +01:00
Evan Hunt
1e21a74595 Merge branch '113-minor-testsummary.sh-improvements-v9_11' into 'v9_11'
Minor testsummary.sh improvements (handling colored output, failure summary)

Closes #113

See merge request isc-projects/bind9!80
2018-02-27 10:04:24 -08:00
Evan Hunt
41c733a052 Do not destroy systests.output if there are no test.output files
(cherry picked from commit 38940619c6)
2018-02-27 10:04:23 -08:00
Michał Kępień
961528efb8 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:23 -08:00
Michał Kępień
da0c363485 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:23 -08:00
Michał Kępień
915b793bfb Tweak the regular expression used for extracting system test results
The current regular expression used for extracting system test results
from systests.output, "^R:", is anchored at the start of a line, which
prevents colored system test output from being properly processed.  As
just "R:" would arguably be too general, extend the pattern a bit to
ensure it will only match lines containing system test results.

(cherry picked from commit 9006d6dbbd)
2018-02-27 10:04:23 -08:00
Evan Hunt
f1edab7d00 Merge branch 'test-output-v9_11' into 'v9_11'
Clean up test output

See merge request isc-projects/bind9!66
2018-02-27 09:52:12 -08:00
Evan Hunt
d57e8f6df3 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

(cherry picked from commit 0e52fbd0b3)
2018-02-27 09:52:07 -08:00
Michał Kępień
56c44b87aa Merge branch '98-add-util-git-replay-merge.sh-v9_11' into 'v9_11'
Put git-replay-merge in source tree

Closes #98

See merge request isc-projects/bind9!83
2018-02-27 10:43:53 +01:00
Michał Kępień
c43062a1c8 Add util/git-replay-merge.sh
git-replay-merge.sh is a script whose purpose is to make backporting
merge requests more convenient by automating the process as much as
possible.

For more information, including usage examples, see:

    https://gitlab.isc.org/isc-projects/bind9/wikis/Backporting-a-Merge-Request

(cherry picked from commit f7fe1e3098)
2018-02-27 10:43:53 +01:00
Evan Hunt
b371e436df Merge branch '112-fix-mx-checks-for-dynamic-updates-v9_12-v9_11' into 'v9_11'
Fix MX checks for dynamic updates

Closes #112

See merge request isc-projects/bind9!79
2018-02-26 15:17:56 -08:00
Michał Kępień
db238f5fe7 Add CHANGES entry
4903.	[bug]		"check-mx fail;" did not prevent MX records containing
			IP addresses from being added to a zone by a dynamic
			update. [GL #112]

(cherry picked from commit 1d403f9d3c)
(cherry picked from commit 71a35bc8e5)
2018-02-26 15:17:33 -08:00
Michał Kępień
457738b3bb Fix MX checks for dynamic updates
The check_mx() function in lib/ns/update.c incorrectly tests whether the
DNS_RDATA_CHECKMX/DNS_RDATA_CHECKMXFAIL flags are set for each applied
MX record update as these flags are never set in code paths related to
dynamic updates; they can only be set when loading a zone from a master
file (DNS_ZONEOPT_CHECKMX -> DNS_MASTER_CHECKMX -> DNS_RDATA_CHECKMX).
This flaw allows MX records containing IP addresses to be added to a
zone even when "check-mx fail;" is used.

Ensure correct behavior by modifying the relevant tests in check_mx() so
that they use DNS_ZONEOPT_CHECKMX/DNS_ZONEOPT_CHECKMXFAIL instead.

(cherry picked from commit 857a40c87b)
(cherry picked from commit 590f092e00)
2018-02-26 15:17:09 -08:00
Evan Hunt
20cd15c4ad Merge branch 'check-for-test-interfaces-before-running-system-tests-v9_11' into 'v9_11'
Check for test interfaces before running system tests

See merge request isc-projects/bind9!19
2018-02-26 15:10:27 -08:00
Evan Hunt
869ebded8d test interfaces directly in runall.sh and parallel.mk
(cherry picked from commit a8b583e78b)
2018-02-26 15:10:27 -08:00
Michał Kępień
54c8d75ee1 Check for test interfaces before running system tests
Prevent runall.sh and "make test" from even attempting to run system
tests when "ifconfig.sh up" has not been run beforehand.  This ensures
the user is not flooded with error messages in such a case.

(cherry picked from commit e0221f2d25)
2018-02-26 15:10:27 -08:00