Commit graph

29878 commits

Author SHA1 Message Date
Ondřej Surý
364f232da8 Add failure handling when iterators don't end with ISC_R_NOMORE
(cherry picked from commit bff83b9480)
2019-12-20 22:02:32 +11:00
Ondřej Surý
a2cf6090b2 Refactor receive_secure_db to make the variables and code flow around the iterator more local
(cherry picked from commit 6012479419)
2019-12-20 22:02:32 +11:00
Mark Andrews
37567e0106 Call dns_dbiterator_destroy earlier to prevent potential deadlock.
(cherry picked from commit 9d8f9cc8f2)
2019-12-20 22:02:32 +11:00
Mark Andrews
c45da64953 Merge branch '1523-pkcs11-destroy-s-usage-message-is-misleading-v9_14' into 'v9_14'
update usage message

See merge request isc-projects/bind9!2787
2019-12-20 09:24:30 +00:00
Mark Andrews
631ac188ee update usage message
(cherry picked from commit 41d827893e)
2019-12-20 20:04:36 +11:00
Mark Andrews
818fdd0490 Merge branch 'feature/master/maxminddb-version-v9_14' into 'v9_14'
Feature/master/maxminddb version v9 14

See merge request isc-projects/bind9!2778
2019-12-18 00:57:50 +00:00
Mark Andrews
299fdfc76f add CHANGES
(cherry picked from commit 2f2bc03b2d)
2019-12-18 00:31:43 +00:00
Petr Menšík
e37d8aecba Include protobuf-c version
Include used version of protobuf-c in version info, both link time and
runtime version is available.

(cherry picked from commit 85f3476894)
2019-12-18 00:31:43 +00:00
Petr Menšík
412d7724ae Provide GeoIP2 library version in version
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.

(cherry picked from commit e6d7384c0d)
2019-12-18 00:31:43 +00:00
Mark Andrews
ce2cf874fd Merge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl-v9_14' into 'v9_14'
Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

See merge request isc-projects/bind9!2779
2019-12-18 00:30:53 +00:00
Ondřej Surý
f42d1be5fa Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace
(cherry picked from commit 8120088ec7)
2019-12-18 11:11:31 +11:00
Ondřej Surý
065d19c023 Merge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval-v9_14' into 'v9_14'
Ensure all zone_settimer() calls are done on locked zone

See merge request isc-projects/bind9!2769
2019-12-12 15:37:36 +00:00
Ondřej Surý
8eac1d365d Ensure all zone_settimer() calls are done on locked zone
(cherry picked from commit cf48e8eb32)
2019-12-12 16:12:51 +01:00
Mark Andrews
caafeb6c7e Merge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs-v9_14' into 'v9_14'
make resolver->zspill atomic to prevent potential deadlock

See merge request isc-projects/bind9!2765
2019-12-12 10:05:05 +00:00
Mark Andrews
02874aa472 make resolver->zspill atomic to prevent potential deadlock
(cherry picked from commit 62abb6aa82)
2019-12-12 20:22:22 +11:00
Evan Hunt
623e23e296 Merge branch 'prep-release-v9_14_9' into 'v9_14'
Prep 9.14.9

See merge request isc-projects/bind9!2762
2019-12-12 06:12:17 +00:00
Tinderbox User
b247e541b0 Merge branch 'prep-release' into v9_14 2019-12-12 06:09:31 +00:00
Tinderbox User
84e68460cc prep 9.14.9 2019-12-12 06:09:19 +00:00
Evan Hunt
9b98a59634 Merge branch 'michal/add-empty-release-notes-section-for-bind-9.14.9' into 'v9_14'
Add empty release notes section for BIND 9.14.9

See merge request isc-projects/bind9!2754
2019-12-11 22:12:02 +00:00
Michał Kępień
f23f682860 Add empty release notes section for BIND 9.14.9 2019-12-11 22:11:38 +00:00
Michal Nowak
4c63562fe6 Merge branch 'mnowak/fedora31-v9.14' into 'v9_14'
[9.14] Update GitLab CI to Fedora 31

See merge request isc-projects/bind9!2758
2019-12-11 16:33:34 +00:00
Michal Nowak
fde281f653 Update GitLab CI to Fedora 31
Since Fedora 31 is the current Fedora release, replace Fedora 30 GitLab
CI jobs with their up-to-date counterparts.

(cherry picked from commit b36f5496237f0dbb84d7541140e87d7da475cd36)
2019-12-11 16:33:33 +00:00
Michał Kępień
56e54fb201 Merge branch 'michal/create-release-tarballs-in-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Create release tarballs in GitLab CI

See merge request isc-projects/bind9!2752
2019-12-11 12:31:13 +00:00
Michał Kępień
7e13a1f7e9 Add a job creating a release tarball to GitLab CI
Add a GitLab CI job (which is run only if all other jobs in a pipeline
succeed) that builds a BIND release tarball, i.e. fetches the source
tarball from the tarball building job, creates Windows zips, puts
certain parts of BIND documentation into the appropriate places, and
packs it all up into a single tarball whose contents can be subsequently
signed and published.

(cherry picked from commit 5a4a6b5e91)
2019-12-11 12:26:48 +01:00
Michał Kępień
7c586d3ac6 Add a Windows debug system test job to GitLab CI
Add a system test job for binaries created by Visual Studio in the
"Debug" build configuration to GitLab CI so that they can be tested
along their "Release" counterparts when necessary.

(cherry picked from commit 2b1c8c54d1)
2019-12-11 12:26:37 +01:00
Michał Kępień
01598c5c2a Add a Windows debug build job to GitLab CI
Add a Visual Studio build job using the "Debug" build configuration to
GitLab CI without enabling it for every pipeline as it takes about twice
as long to complete as its "Release" counterpart.

(cherry picked from commit 12564928a7)
2019-12-11 12:26:11 +01:00
Michał Kępień
d1b120d3bd Create and test BIND source tarballs in GitLab CI
Add a set of jobs to GitLab CI that create a BIND source tarball and
then build and test its contents.  Run those extra jobs only when a tag
is pushed to the Git repository as they are only meant to be sanity
checks of BIND source tarball contents.

(cherry picked from commit 8d56749046)
2019-12-11 12:24:17 +01:00
Michał Kępień
f60cd0c730 Include prepare-softhsm2.sh in source tarballs
The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.

(cherry picked from commit c0be772ebc)
2019-12-11 12:23:20 +01:00
Michał Kępień
89cccc53ba List paths which should be excluded from tarballs
Convert the logic (currently present in the form of "rm -rf" calls in
util/kit.sh) for removing files and directories which are tracked by Git
but redundant in release tarballs into a set of .gitattributes rules
which allow the same effect to be achieved using "git archive".

(cherry picked from commit 925ecb0aae)
2019-12-11 12:22:14 +01:00
Mark Andrews
872462fe7b Merge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race resolver.c:2153 in fctx_query"

See merge request isc-projects/bind9!2748
2019-12-11 00:35:59 +00:00
Mark Andrews
e40c1582d6 Note bucket lock requirements and move REQUIRE inside locked section.
(cherry picked from commit 13aaeaa06f)
2019-12-11 11:01:59 +11:00
Mark Andrews
0de313fff7 lock access to fctx->nqueries
(cherry picked from commit 5589748eca)
2019-12-11 11:01:59 +11:00
Mark Andrews
bd6a5a9993 Merge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0-v9_14' into 'v9_14'
address deadlock introduced in cd2469d3cd

See merge request isc-projects/bind9!2743
2019-12-10 13:04:22 +00:00
Mark Andrews
8bd8ed26ed address deadlock introduced in cd2469d3cd
(cherry picked from commit fd52417f71)
2019-12-10 23:38:53 +11:00
Michał Kępień
7242c4fbd7 Merge branch '1465-fix-idna-system-test-v9_14' into 'v9_14'
[v9_14] Fix the "idna" system test

See merge request isc-projects/bind9!2741
2019-12-10 11:28:43 +00:00
Michał Kępień
7c14f67d74 Only use LC_ALL=C where intended
The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.

(cherry picked from commit 2ee7ff23ce)
2019-12-10 11:57:57 +01:00
Matthijs Mekking
18d314fa64 Merge branch '1457-intermittent-failure-autosign-v9_14' into 'v9_14'
Resolve "Intermittent failure in the autosign system test"

See merge request isc-projects/bind9!2732
2019-12-09 15:30:27 +00:00
Matthijs Mekking
6658c11251 Better error handling in autosign system test
(cherry picked from commit bd4035900a)
2019-12-09 16:01:53 +01:00
Matthijs Mekking
fb0ddd5bfe Fix race in autosign test
The autosign test has a test case where a DNSSEC maintaiend zone
has a set of DNSSEC keys without any timing metadata set.  It
tests if named picks up the key for publication and signing if a
delayed dnssec-settime/loadkeys event has occured.

The test failed intermittently despite the fact it sleeps for 5
seconds but the triggered key reconfigure action should happen after
3 seconds.

However, the test output showed that the test query came in before
the key reconfigure action was complete (see excerpts below).

The loadkeys command is received:

15:38:36 received control channel command 'loadkeys delay.example.'

The reconfiguring zone keys action is triggered after 3 seconds:

15:38:39 zone delay.example/IN: reconfiguring zone keys
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7484 (ZSK) is now published
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7455 (KSK) is now published
15:38:39 writing to journal

Two seconds later the test query comes in:

15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: query
15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: endrequest

And 6 more seconds later the reconfigure keys action is complete:

15:38:47 zone delay.example/IN: next key event: 05-Dec-2019 15:48:39

This commit fixes the test by checking the "next key event" log has
been seen before executing the test query, making sure that the
reconfigure keys action has been complete.

This commit however does not fix, nor explain why it took such a long
time (8 seconds) to reconfigure the keys.

(cherry picked from commit 2e4273b55a)
2019-12-09 15:53:02 +01:00
Matthijs Mekking
5d6fad9e1e Introduce wait_for_log in autosign test 2019-12-09 15:52:00 +01:00
Matthijs Mekking
440732acd7 Save settime output
(cherry picked from commit 6b4a17ef7c)
2019-12-09 15:45:11 +01:00
Michał Kępień
fdccea0896 Merge branch '1452-system-test-framework-cleanup-tweaks-v9_14' into 'v9_14'
[v9_14] System test framework: cleanup tweaks

See merge request isc-projects/bind9!2721
2019-12-06 13:48:53 +00:00
Michał Kępień
5f82122ffa Automatically run clean.sh from run.sh
The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.

(cherry picked from commit d8905b7a9c)
2019-12-06 14:47:08 +01:00
Michał Kępień
3f7658bda7 Remove bin/tests/system/clean.sh
Since the role of the bin/tests/system/clean.sh script has now been
reduced to calling a given system test's clean.sh script, remove the
former altogether and replace its only use with a direct invocation of
the latter.

(cherry picked from commit bf3eeac067)
2019-12-06 14:47:08 +01:00
Michał Kępień
9a60296b84 Remove the -r switch from system test scripts
Since files containing system test output are no longer stored in test
subdirectories, bin/tests/system/clean.sh no longer needs to take care
of removing the test.output file for a given test as testsummary.sh
already takes care of that and even if a test suite terminates
abnormally and another one is started, tee invoked without the -a
command line switch overwrites the destination file if it exists, so
leftover test.output.* files from previous test suite runs are not a
concern.  Remove the -r command line switch and the code associated with
it from the relevant scripts.

(cherry picked from commit b4d37878f6)
2019-12-06 14:47:08 +01:00
Michał Kępień
38a4bedfcd Store system test output in bin/tests/system/
Some clean.sh scripts contain overly broad file deletion wildcards which
cause the test.output file (used by the system test framework for
collecting output) in a given system test's directory to be erroneously
removed immediately after the test is started (due to setup.sh scripts
calling clean.sh at the beginning).  This prevents the test's output
from being placed in bin/tests/system/systests.output at the end of a
test suite run and thus can lead to test failures being ignored.  Fix by
storing each test's output in a test.output.<test-name> file in
bin/tests/system/, which prevents clean.sh scripts from removing it (as
they should only ever affect files contained in a given system test's
directory).

(cherry picked from commit b0916bba41)
2019-12-06 14:47:08 +01:00
Michał Kępień
8ed6c8fd59 Merge branch '1452-detect-missing-system-test-results-v9_14' into 'v9_14'
[v9_14] Detect missing system test results

See merge request isc-projects/bind9!2720
2019-12-06 13:46:31 +00:00
Michał Kępień
19cd59923c Detect missing system test results
At the end of each system test suite run, the system test framework
collects all existing test.output files from system test subdirectories
and produces bin/tests/system/systests.output from those files.
However, it does not check whether a test.output file was found for
every executed test.  Thus, if the test.output file is accidentally
deleted by the system test itself (e.g. due to an overly broad file
removal wildcard present in clean.sh), its output will not be included
in bin/tests/system/systests.output.  Since the result of each system
test suite run is determined by bin/tests/system/testsummary.sh, which
only operates on the contents of bin/tests/system/systests.output, this
can lead to test failures being ignored.  Fix by ensuring the number of
test results found in bin/tests/system/systests.output is equal to the
number of tests run and triggering a system test suite failure in case
of a discrepancy between these two values.

(cherry picked from commit 3c3085be3c)
2019-12-06 14:19:55 +01:00
Mark Andrews
1b0845a182 Merge branch '1455-job-failed-453300-v9_14' into 'v9_14'
loop waiting for the redirect zone to load

See merge request isc-projects/bind9!2713
2019-12-06 00:19:40 +00:00
Mark Andrews
a47736abb0 loop waiting for the redirect zone to load
(cherry picked from commit e4b1d0b686)
2019-12-06 10:57:16 +11:00