Commit graph

8207 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
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
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
223a646d54 restore long options for run.sh
(cherry picked from commit 4a714bffbc)
2018-03-07 14:35:30 -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
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
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
421c9eff41 fix addzone merge errors 2018-03-04 00:33:50 -08: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
Mark Andrews
3ebcbe5233 remove unnecessary copy_setports calls
(cherry picked from commit d4040783f4)
2018-03-01 14:15:48 +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
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
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
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
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ń
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
Evan Hunt
813f341328 wait for synchronization; re-notify slave if the transfer doesn't happen
(cherry picked from commit 67a8b5ec17)
2018-02-26 15:00:01 -08:00
Evan Hunt
0be726b440 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:45:13 +11:00
Mark Andrews
ae50b73d78 remove deadcode
(cherry picked from commit b71a1386ed)
2018-02-26 10:40:10 +11:00
Mark Andrews
b58a93d45a remove unused struct dst_context declaration
(cherry picked from commit f2c22662cc)
2018-02-26 10:40:09 +11:00
Evan Hunt
d965560e41 fixed an upforwd test error.
(cherry picked from commit 54e010d51e)
2018-02-25 13:56:04 -08:00
Michał Kępień
2cd174dda9 Preserve values of environment variables which are already set
This enables the environment variables controlling run.sh behavior to be
permanently set in a working environment (e.g. to automatically force
colored output without using "-c" in each runall.sh invocation).

Relevant runall.sh command line arguments still have a higher priority.

(cherry picked from commit d989d20fe5)
2018-02-24 17:37:44 -08:00
Michał Kępień
cbebf7ef59 Allow forcing colored system test output
As parallel.mk and runsequential.sh both pipe system test output through
"tee" (for the purpose of creating test.output), run.sh invoked from
these two files detects it is not writing to a terminal, which prevents
colored output from being generated.  Allow forcing colored output using
a new command line argument for runall.sh, "-c", which sets an
environment variable (SYSTEMTEST_FORCE_COLOR) causing conf.sh to
unconditionally enable colored output.

The same environment variable can also be used directly to force colored
output when using "make test" instead of runall.sh.

(cherry picked from commit a324031a82)
2018-02-24 17:37:44 -08:00
Michał Kępień
e9c4dbe361 Allow retaining system test output using an environment variable
Instead of exporting an environment variable containing a command line
argument (NOCLEAN="-n"), extend run.sh to handle a "boolean" environment
variable (SYSTEMTEST_NO_CLEAN) itself.  The former method is buggy
because the value of NOCLEAN is set in parallel.mk when that file is
first created, but it is not subsequently updated upon each test run
(because make considers parallel.mk to be up to date).

To retain backward compatibility, the "-n" command line argument for
run.sh is still supported (and has a higher priority than the relevant
environment variable).

The SYSTEMTEST_NO_CLEAN environment variable can also be used directly
to prevent cleanup when using "make test" instead of runall.sh.

Apart from fixing a bug, this simplifies the way runall.sh controls
run.sh behavior due to the Makefile being bypassed.  Direct processing
of environment variables in run.sh is more scalable in the long run,
given that the previously utilized technique, even with its
implementation fixed, would still require Makefile.in to be modified in
two places each time a new flag needed to be passed from runall.sh to
run.sh.

(cherry picked from commit 3862043879)
2018-02-24 17:37:44 -08:00
Evan Hunt
948bd83ce5 improve reliability of xfer test
(cherry picked from commit 5d7d6881a1)
(cherry picked from commit 09a1a261dc)
2018-02-24 01:46:52 -08:00
Evan Hunt
dcd2348c8e improve dyndb test resilience
- no longer grep for specific line numbers when checking
  parameter logging, as those can change
- report the failure immediatey if parameter check fails

(cherry picked from commit 749df056be)
2018-02-23 13:44:53 -08:00
Evan Hunt
854f7846d8 tidying up after backport 2018-02-23 13:28:47 -08:00
Evan Hunt
c369fc06ca improve reliability of the xfer test on slow systems
- lengthed the wait loop for the transfers to complete

(cherry picked from commit b9246ce773)
(cherry picked from commit a5015d7791)
2018-02-23 13:25:29 -08:00
Evan Hunt
626566c72d remove v6synth
- this was a test for the allow-v6-synthesis option, which was
  deprecated and no longer works. the test was removed
  from conf.sh.in long ago.

(cherry picked from commit 474b10a133)
(cherry picked from commit 7971873639)
2018-02-23 13:25:27 -08:00
Evan Hunt
350f18b0d1 removed some unnecessary greps
(cherry picked from commit 731ad28be2)
(cherry picked from commit 17245b86d5)
2018-02-23 13:24:53 -08:00
Evan Hunt
fa8740feda reorder tests to get better use of parallelism
(cherry picked from commit 56e440f65f)
(cherry picked from commit 4429f8b291)
2018-02-23 13:24:51 -08:00
Evan Hunt
167fa161d1 parallelize most system tests
(cherry picked from commit c032c54dda)
(cherry picked from commit 2b81f322cb)
2018-02-23 13:23:31 -08:00
Stephen Morris
71332991fc Fixups after merge of branch 'rt46602-v9_11' into 'v9_11' 2018-02-22 15:41:04 +00:00
Stephen Morris
c4f5d07c1c [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

(cherry picked from commit 7bb9a97904)
2018-02-22 11:17:30 +00:00
Stephen Morris
3d4a425266 [rt46602] Miscellaneous changes to fix rebase issues
(cherry picked from commit 7222c9fc76)
2018-02-22 11:15:22 +00:00
Stephen Morris
78f2976087 [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.

(cherry picked from commit 30cd931a0d)
2018-02-22 11:14:41 +00:00
Michał Kępień
747df7d66a [rt46602] Export environment variables in a portable manner
(cherry picked from commit 2c519531a7)
2018-02-22 11:14:41 +00:00
Michał Kępień
cfaeb55e8e [rt46602] Sanitize test names to fix "make check" on Solaris
(cherry picked from commit e005fb948d)
2018-02-22 11:14:40 +00:00
Stephen Morris
6508d98a98 [rt46602] Add .gitignore file for catz
(cherry picked from commit 3dfb7c17eb)
2018-02-22 11:14:40 +00:00
Stephen Morris
0ae7e64829 [rt46602] Pass noclean option to Makefile via exported variable
(cherry picked from commit 59d88ee192)
2018-02-22 11:14:40 +00:00
Stephen Morris
06a9a37d3b [rt46602] Mention conf.sh.win32 in instructions for adding a test.
(cherry picked from commit 23dfa27a84)
2018-02-22 11:14:40 +00:00
Michał Kępień
b40e75a75c [rt46602] Fix various typos, formatting issues and stylistic nits
(cherry picked from commit f0721de624)
2018-02-22 11:14:40 +00:00
Michał Kępień
4436930712 [rt46602] Remove redundant variable assignment
(cherry picked from commit 42cf18d239)
2018-02-22 11:14:40 +00:00