Commit Graph

8358 Commits

Author SHA1 Message Date
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
Michał Kępień
4a5754705d 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:13 -08:00
Evan Hunt
5053a56072 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:41:38 -08:00
Evan Hunt
4ead1640e3 Merge branch '112-fix-mx-checks-for-dynamic-updates-v9_12' into 'v9_12'
Fix MX checks for dynamic updates

Closes #112

See merge request isc-projects/bind9!79
2018-02-26 15:16:33 -08:00
Michał Kępień
590f092e00 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)
2018-02-26 15:15:27 -08:00
Evan Hunt
537d5cc191 Merge branch 'check-for-test-interfaces-before-running-system-tests-v9_12' into 'v9_12'
Check for test interfaces before running system tests

See merge request isc-projects/bind9!19
2018-02-26 15:10:18 -08:00
Evan Hunt
bf4c798819 test interfaces directly in runall.sh and parallel.mk
(cherry picked from commit a8b583e78b)
2018-02-26 15:10:18 -08:00
Michał Kępień
9cd1a41f31 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:18 -08:00
Evan Hunt
70f37ce833 wait for synchronization; re-notify slave if the transfer doesn't happen
(cherry picked from commit 67a8b5ec17)
2018-02-26 14:59:09 -08:00
Evan Hunt
26b1e37f87 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:39:44 +11:00
Mark Andrews
a7c51e8c79 remove deadcode
(cherry picked from commit b71a1386ed)
2018-02-26 10:39:44 +11:00
Mark Andrews
4fd6458326 remove unused struct dst_context declaration
(cherry picked from commit f2c22662cc)
2018-02-26 10:39:44 +11:00
Evan Hunt
26c1d47e88 fixed an upforwd test error.
(cherry picked from commit 54e010d51e)
2018-02-25 13:55:59 -08:00
Michał Kępień
62ae94478c 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:35:57 -08:00
Michał Kępień
1ff4ee81e0 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:35:57 -08:00
Michał Kępień
3c9384eebb 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:35:57 -08:00
Evan Hunt
09a1a261dc improve reliability of xfer test
(cherry picked from commit 5d7d6881a1)
2018-02-24 01:45:46 -08:00
Evan Hunt
b41d27d2a2 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:39:55 -08:00
Michał Kępień
59c637c019 Fix dyndb system test after copyright information update
(cherry picked from commit b20ff30a79)
2018-02-23 16:02:48 +01:00
Ondřej Surý
557a5c3f78 Update license headers to not include years in copyright in all applicable files
(cherry picked from commit 843d389661)
2018-02-23 10:38:02 +01:00
Evan Hunt
7f1039d8d0 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

(cherry picked from commit 0c559199bf)
2018-02-23 08:34:37 +01:00
Evan Hunt
a5015d7791 improve reliability of the xfer test on slow systems
- lengthed the wait loop for the transfers to complete

(cherry picked from commit b9246ce773)
2018-02-23 08:32:03 +01:00
Evan Hunt
7971873639 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)
2018-02-23 08:32:03 +01:00
Evan Hunt
17245b86d5 removed some unnecessary greps
(cherry picked from commit 731ad28be2)
2018-02-23 08:32:03 +01:00
Evan Hunt
4429f8b291 reorder tests to get better use of parallelism
(cherry picked from commit 56e440f65f)
2018-02-23 08:32:03 +01:00
Evan Hunt
2b81f322cb parallelize most system tests
(cherry picked from commit c032c54dda)
2018-02-23 08:31:59 +01:00
Mark Andrews
dc445b7d8a Merge branch '68-rpz-system-test-fails-intermittently' into 'master'
Prevent rpz system test from wiping out forensic data

See merge request isc-projects/bind9!51

(cherry picked from commit 14388a4ad6)

034450ba add test numbers as use them in file names
05f9deba use symbolic test modes native/dnsrps
b98a9207 perform rpz testing with a loop rather that recursion
f7172cf2 add CHANGES note
2018-02-21 23:10:12 -05:00
Mark Andrews
d7cd9fe95b Merge branch '82-cacheclean-test-is-not-robust' into 'master'
Resolve "cacheclean test is not robust."

Closes #82

See merge request isc-projects/bind9!50

(cherry picked from commit aa7964dd4b)

146c16c0 check that sed selects a non zero range of lines
8c8ad74a add CHANGES entry
2018-02-21 20:17:21 -05:00
Stephen Morris
1d1b37d838 [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-21 15:44:40 +00:00
Stephen Morris
a9e25e9686 [rt46602] Miscellaneous changes to fix rebase issues
(cherry picked from commit 7222c9fc76)
2018-02-21 15:44:40 +00:00
Stephen Morris
2b0b035571 [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-21 15:44:40 +00:00
Michał Kępień
8fc6d51b0d [rt46602] Export environment variables in a portable manner
(cherry picked from commit 2c519531a7)
2018-02-21 15:44:40 +00:00
Michał Kępień
a8b10e9b3a [rt46602] Sanitize test names to fix "make check" on Solaris
(cherry picked from commit e005fb948d)
2018-02-21 15:44:40 +00:00
Stephen Morris
9078c24900 [rt46602] Add .gitignore file for catz
(cherry picked from commit 3dfb7c17eb)
2018-02-21 15:44:40 +00:00
Stephen Morris
121be65138 [rt46602] Pass noclean option to Makefile via exported variable
(cherry picked from commit 59d88ee192)
2018-02-21 15:44:40 +00:00
Stephen Morris
b98e011dc6 [rt46602] Mention conf.sh.win32 in instructions for adding a test.
(cherry picked from commit 23dfa27a84)
2018-02-21 15:44:40 +00:00
Michał Kępień
c6b66a406d [rt46602] Fix various typos, formatting issues and stylistic nits
(cherry picked from commit f0721de624)
2018-02-21 15:44:39 +00:00
Michał Kępień
18b0ad81ec [rt46602] Remove redundant variable assignment
(cherry picked from commit 42cf18d239)
2018-02-21 15:44:39 +00:00
Michał Kępień
63bbbb936a [rt46602] named.port is no longer created by setup.sh for allow_query
(cherry picked from commit 1ac4c3e4e5)
2018-02-21 15:44:39 +00:00
Michał Kępień
933bba9d73 [rt46602] Consistently print usage for runall.sh to stderr
(cherry picked from commit fe1ccafc34)
2018-02-21 15:44:39 +00:00
Michał Kępień
9ff064089b [rt46602] Clean up getopts usage
Ensure case clauses are in sync with the string passed to getopts.
Remove catch-all clauses as they will never be evaluated.

(cherry picked from commit 0dcee1cad3)
2018-02-21 15:44:39 +00:00
Michał Kępień
815820b3a9 [rt46602] Assign default values to variables set by command line options and consistently treat them as integers
(cherry picked from commit fe51c34df3)
2018-02-21 15:44:39 +00:00
Michał Kępień
3c7784b745 [rt46602] named.port cannot be ignored by git because it is required to be present by notify/ns4
(cherry picked from commit 1960de5530)
2018-02-21 15:44:39 +00:00
Michał Kępień
5b0a99e291 [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.

(cherry picked from commit 344d05063f)
2018-02-21 15:44:39 +00:00
Stephen Morris
6f341ed6cd [rt46602] Remove option to format the printed start time of a test
There was too much incompatibility between operating systems as to
the allowed options for "date".

(cherry picked from commit 451b7309ca)
2018-02-21 15:44:39 +00:00
Stephen Morris
d59a3f1c82 [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.

(cherry picked from commit 462766cd76)
2018-02-21 15:44:39 +00:00
Stephen Morris
c18241451b [rt46602] Fix EXTRAPORT substitutions in copy_setport
Fix problems where all EXTRAPORT macros were being replaced by
the EXTRAPORT1 value. (Copy and paste issue.)

(cherry picked from commit fb78f82ba1)
2018-02-21 15:44:39 +00:00
Stephen Morris
33394a55e4 [rt46602] Minor documentation changes
(cherry picked from commit cdf18a5009)
2018-02-21 15:44:39 +00:00