2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

2400 Commits

Author SHA1 Message Date
Evan Hunt
0fabe0da83 update file headers 2018-03-15 18:33:13 -07:00
Evan Hunt
733086cc67 clean up dig.out files that were left behind after xfer test 2018-03-10 13:04:31 -08:00
Evan Hunt
74347f4a55 reduce race risk in parallel builds 2018-03-09 14:12:50 -08:00
Evan Hunt
ccfe778c01 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
2018-03-09 14:12:48 -08:00
Michał Kępień
ab2913a29f 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.
2018-03-08 13:57:30 -05:00
Michał Kępień
012ca0a27d 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.
2018-03-08 13:19:54 +01:00
Mark Andrews
ca55c672b0 add test configuration where a in-view zone collides with a existing zone 2018-03-08 11:50:09 +11:00
Evan Hunt
1eff695f33 use the test name in the -D string for each name server 2018-03-07 17:37:00 -05:00
Evan Hunt
4a714bffbc restore long options for run.sh 2018-03-07 17:22:58 -05:00
Evan Hunt
a9b6bed6af eliminate unnecessary waiting in allow-query test
- grep in the log to see if configuration is finished rather
  than sleeping for 5 seconds
2018-03-07 13:20:01 -08:00
Evan Hunt
ffc3e73c36 rename allow_query to allow-query 2018-03-07 13:17:11 -08:00
Evan Hunt
82e9b59b91 fixed typo that caused the notify test to run slowly 2018-03-06 11:41:35 -08:00
Evan Hunt
3eb90582de 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 10:59:45 -08:00
Evan Hunt
86838b2a02 revise soft limit test
- don't bail out of the loop if clients are exceeded, just count incidents
- verbosely describe expectations and results
2018-03-01 09:26:14 -05:00
Mark Andrews
4cb0873a0a wait for 'all zones loaded' rather than 'reloading zones succeeded' which just indicates that everything kicked off ok 2018-02-28 17:14:30 +11:00
Evan Hunt
38940619c6 Do not destroy systests.output if there are no test.output files 2018-02-27 09:47:59 +01:00
Michał Kępień
642e20db8a Use echoinfo for printing test summary
This ensures testsummary.sh is consistent with other scripts belonging
to the test framework.
2018-02-27 09:47:59 +01:00
Michał Kępień
28068857e7 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.
2018-02-27 09:45:03 +01:00
Michał Kępień
9006d6dbbd 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.
2018-02-27 08:59:51 +01: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
Evan Hunt
2e7c726bb0 Merge branch '112-fix-mx-checks-for-dynamic-updates' into 'master'
Fix MX checks for dynamic updates

Closes #112

See merge request isc-projects/bind9!79
2018-02-26 17:56:32 -05:00
Evan Hunt
a8b583e78b test interfaces directly in runall.sh and parallel.mk 2018-02-26 14:58:16 +01:00
Michał Kępień
e0221f2d25 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.
2018-02-26 14:12:48 +01:00
Michał Kępień
857a40c87b 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.
2018-02-26 13:10:45 +01:00
Evan Hunt
67a8b5ec17 wait for synchronization; re-notify slave if the transfer doesn't happen 2018-02-25 22:18:30 -08:00
Evan Hunt
54e010d51e fixed an upforwd test error. 2018-02-25 13:43:14 -08:00
Evan Hunt
4c753f5880 Merge branch 'tidy-runall.sh-environment-variables' into 'master'
Tidy runall.sh environment variables

See merge request isc-projects/bind9!18
2018-02-24 15:43:22 -05:00
Evan Hunt
5d7d6881a1 improve reliability of xfer test 2018-02-23 16:52:34 -08:00
Evan Hunt
749df056be 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
2018-02-23 10:15:15 -08:00
Michał Kępień
b20ff30a79 Fix dyndb system test after copyright information update 2018-02-23 13:55:05 +01: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
Ondřej Surý
996f5154f0 Revert removal of bin/tests/system/common/controls.conf, it's still needed 2018-02-23 10:08:37 +01:00
Ondřej Surý
ab1b02d274 Update copyright information after !59 merge. 2018-02-23 09:02:49 +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
b9246ce773 improve reliability of the xfer test on slow systems
- lengthed the wait loop for the transfers to complete
2018-02-22 22:08:02 -08:00
Evan Hunt
474b10a133 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.
2018-02-22 15:29:02 -08:00
Evan Hunt
731ad28be2 removed some unnecessary greps 2018-02-22 15:29:02 -08:00
Evan Hunt
56e440f65f reorder tests to get better use of parallelism 2018-02-22 15:29:02 -08:00
Evan Hunt
c032c54dda parallelize most system tests 2018-02-22 15:29:02 -08:00
Mark Andrews
b98a92071d perform rpz testing with a loop rather that recursion 2018-02-22 14:01:42 +11:00
Mark Andrews
05f9deba0b use symbolic test modes native/dnsrps 2018-02-22 14:01:42 +11:00
Mark Andrews
034450ba02 add test numbers as use them in file names 2018-02-22 14:01:42 +11:00
Mark Andrews
146c16c06e check that sed selects a non zero range of lines 2018-02-22 11:30:07 +11:00
Michał Kępień
d989d20fe5 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.
2018-02-21 14:59:38 +01:00
Michał Kępień
a324031a82 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.
2018-02-21 14:59:35 +01:00
Michał Kępień
3862043879 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.
2018-02-21 14:59:33 +01:00
Mark Andrews
643c8c27ff Merge branch '67-stabilize-cacheclean-system-test' into 'master'
Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43
2018-02-20 16:01:00 -05:00
Michał Kępień
ca1049b2f3 Improve the way cache contents are searched for "ns.flushtest.example"
During the "check flushtree clears adb correctly" check, expecting
"ns.flushtest.example" to always be the first name in the ADB dump is
fragile, because in a certain corner case "a.root-servers.nil" will be
the first name instead.

As the purpose of the relevant check is to ensure "ns.flushtest.example"
is removed from ADB by "rndc flushtree flushtest.example", search the
entire list of names present in ADB instead of just the first entry when
looking for "ns.flushtest.example".
2018-02-20 13:59:29 +01:00
Michał Kępień
2bbff06d36 Wait until a cache dump completes instead of waiting for a fixed amount of time
Dumping the cache is an asynchronous operation, so sleeping for a fixed
amount of time after running "rndc dumpdb" is imperfect as dumping cache
contents may take longer than expected on slower machines.  Instead of
always sleeping for 1 second, wait until the "; Dump complete" line
appears in the dump or 10 seconds pass, whichever comes first.
2018-02-20 13:59:28 +01:00
Michał Kępień
aeea1faf01 Do not overwrite cache dumps
Unless configured otherwise in named.conf, "rndc dumpdb" causes a cache
dump to be written to a file called "named_dump.db" in the working
directory of the given named instance.  Repeatedly using this command
throughout different checks in the cacheclean system test causes cache
dumps for older checks to be overwritten, which hinders failure
diagnosis.  Prevent this by moving each cache dump to a check-specific
location after running "rndc dumpdb".

Furthermore, during the "check flushtree clears adb correctly" check,
dump_cache() is called twice without renaming the resulting files.
Prevent the first cache dump from being overwritten by moving it to a
different file before calling "rndc dumpdb" for the second time.
2018-02-20 13:59:27 +01:00