Commit Graph

285 Commits

Author SHA1 Message Date
Michal Nowak
387fbbd4df Add Alpine Linux 3.14
(cherry picked from commit 80f828bc37)
2021-06-17 18:19:18 +02:00
Ondřej Surý
8c20738feb Change the LLVM tools version to 12
LLVM 12 stable was released on 15. April 2021, change the default
version to the current stable.

(cherry picked from commit 9f7855322c)
2021-06-12 08:58:22 +02:00
Michal Nowak
f19bdd7fd4 Add Fedora 34
(cherry picked from commit 5f27aaa0ff)
2021-05-28 12:59:02 +02:00
Michal Nowak
d3aa8f4f5a Install BIND with "make DESTDIR=<PATH> install"
BIND installation should be done by setting DESTDIR during "make
install" not by setting prefix via ./configure.

Make sure that installation with DESTDIR=<PATH> works by checking that
named binary and it's respective man page were installed and that
well-known BIND9 directories - and only them - are present in DESTDIR.

Also rename install path variable from BIND_INSTALL_PATH to
INSTALL_PATH to avoid namespace clash in stress tests which use
BIND_INSTALL_PATH variable to configure path to BIND9 binaries.

(cherry picked from commit 823bf3e79b)
2021-05-25 12:03:34 +02:00
Ondřej Surý
e1725d75c3 Replace Ubuntu 16.04 LTS with Ubuntu 18.04 LTS in the GitLab CI
Ubuntu 16.04 (Xenial Xerus) is reaching End of Standard Support in April
2021 thus we are removing it from the list of supported platforms and
replacing it with Ubuntu 18.04 LTS (Bionic Beaver).

(cherry picked from commit 4402a90bb7)
2021-05-24 21:53:57 +02:00
Michal Nowak
0c3e2e6c42 Run gcc:tarball CI job for merge requests
Running gcc:tarball CI job for merge requests is consistent with how we
run gcc:out-of-tree CI job and should help identify problems with the
build system during the review process, not once merged during daily
runs. For the sake of time, unit and system tests associated with the
gcc:tarball CI job are excluded from merge requests.

Also, make sure that the tarball-create CI job includes the
default_triggering_rules anchor (as it is on the main branch), otherwise
adding the gcc:tarball CI job to merge request-triggered pipeline fails
with:

    Found errors in your .gitlab-ci.yml: 'gcc:tarball' job needs 'tarball-create' job but it was not added to the pipeline

(cherry picked from commit 83617cea9a)
2021-05-24 19:29:23 +02:00
Michal Nowak
582d7fc860 Do not spawn FreeBSD 11 CI jobs in merge requests
(cherry picked from commit 70eccd2952)
2021-05-24 18:37:37 +02:00
Michal Nowak
a496ab42f1 Create an anchor for schedules, tags, and web rules
It's a common pattern to spawn CI jobs only for pipelines triggered by
schedules, tags, and web. There should be an anchor so that the rules
are not repeated.

(cherry picked from commit e4f88c359c)
2021-05-24 18:22:52 +02:00
Michal Nowak
ddf03eb546 Add FreeBSD 13.0
(cherry picked from commit 0714fe6f40)
2021-05-24 18:18:44 +02:00
Michal Nowak
fec3bc59f5 Add OpenBSD 6.9
(cherry picked from commit 315b8522ba)
2021-05-19 18:25:33 +02:00
Michal Nowak
06bddc8882 Suppress TSAN errors from libfstrm.so
dnstap_test produces TSAN errors which originate in libfstrm.so. Unless
libfstrm is TSAN clean or a workaround is placed in libfstrm sources,
suppressing TSAN coming from libfstrm is necessary to test DNSTAP under
TSAN.

(cherry picked from commit c97c6fbfea)
2021-04-30 10:03:21 +02:00
Michal Nowak
c1103b72c7 Configure with --enable-dnstap by default
All platforms but OpenBSD have dnstap dependencies readily in their
respective repositories, and dnstap thus can be tested there. Given that
majority of images have dnstap dependencies available, it seems fitting
to make dnstap enabled by default.

(cherry picked from commit deff0ae317)
2021-04-30 10:03:21 +02:00
Michal Nowak
a4ef2de0c7 Disable pytest cacheprovider plugin in CI
The pytest "cacheprovider" plugin produces a .cache/v/cache/lastfailed
file, which holds a Python dictionary structure with failed tests.
However, on Ubuntu 16.04 (Xenial) the file is created even though the
test passed and the file contains just an empty dictionary ("{}").

Given that we are not interested in this feature, disabling the
"cacheprovider" plugin globally and removing per-test removals of the
.cache directory seems like the best course of action.

(cherry picked from commit e1c3034107)
2021-04-29 15:49:44 +02:00
Michał Kępień
fb90a34fd7 Test "--without-gssapi" in GitLab CI
GitLab CI pipelines do not currently include a Linux job that would have
GSSAPI support disabled.  Add the "--without-gssapi" option to the
./configure invocation on Debian 9 to address that deficiency and also
to continuously test that build-time switch.

(cherry picked from commit a3957af864)
2021-04-26 09:27:31 +02:00
Michał Kępień
233294d750 Fix triggering rules for the "tarball-create" job
Commit fd8ce68189 (a backport of commit
4d5d3b75da) did not account for the fact
that the "tarball-create" GitLab CI job is not created for manually
triggered pipelines.  This prevents manual pipeline creation from
succeeding as it causes the "gcc:tarball" job to have unsatisfied
dependencies.  Make sure the "tarball-create" job is created for
manually triggered pipelines to allow such pipelines to be started
again.
2021-04-07 22:31:09 +02:00
Michal Nowak
fd8ce68189 Run gcc:tarball CI job in web-triggered pipelines
The gcc:tarball CI job may identify problems with tarballs created by
"make dist" of the tarball-create CI job. Enabling the gcc:tarball CI
job in web-triggered pipelines provides developers with a test vector.

(cherry picked from commit 4d5d3b75da)
2021-03-31 16:53:51 +02:00
Ondřej Surý
74c537adb9 Disable allow_failure for ThreadSanitizer jobs
Since the main branch is now TSAN-clean, it's a good opportunity to
enable hard failures for the TSAN system test jobs.

(cherry picked from commit 4072cc2b93)
2021-03-04 16:25:50 +01:00
Michal Nowak
13bf49fd5d Add ThreadSanitizer core dumping flags
This should let us have core dumps from crashed system test when
ThreadSanitizer is enabled.

(cherry picked from commit a730bc47f5)
2021-03-04 16:25:50 +01:00
Michal Nowak
76cfefe3fc Add Alpine Linux 3.13
(cherry picked from commit 909c85f7a9)
2021-02-23 15:46:42 +01:00
Michal Nowak
74fa196286 Make "kyua report-html" less verbose on stdout
"kyua report-html" command in CI generates more than two pages of output
to stdout, which is nothing but which HTML pages Kyua generated, e.g.:

  Generating kyua_html/context.html
  Generating kyua_html/lib_dns_tests_acl_test_main.html
  ...
  Generating kyua_html/lib_ns_tests_query_test_main.html
  Generating kyua_html/report.css
  Generating kyua_html/index.html

This is seldomly useful and requires the user to scroll three pages
upwards to get to unit test results.
2021-02-18 15:39:04 +01:00
Michal Nowak
f3f77fa4fc Check for "file not removed" in system test output
Run this check only when in Git repository, because run.sh produces the
"file not removed" warnings only when in Git repository.

(cherry picked from commit 4a2778abdf)
2021-02-18 08:20:54 +01:00
Petr Špaček
441d2e310e Run Python linters in CI even outside of merge requests
Previously it did not get run on scheduled CI pipelines.

(cherry picked from commit 74d7cddc4c)
2021-02-12 15:51:05 +01:00
Michal Nowak
ec278d628d Add --enable-option-checking=fatal to ./configure in CI
The --enable-option-checking=fatal option prevents ./configure from
proceeding when an unknown option is used in the ./configure step in CI.
This change will avoid adding unsupported ./configure options or options
with typo or typo in pairwise testing "# [pairwise: ...]" marker.

(cherry picked from commit 4295c82e45)
2021-02-12 14:16:26 +01:00
Michal Nowak
69a51f311a Lint manual pages
As we generate manual pages from reStructuredText sources, we don't have
absolute control on manual page output and therefore 'mandoc -Tlint' may
always report warnings we can't eliminate. In light of this some mandoc
warnings need to be ignored.

(cherry picked from commit 22fdcb30db)
2021-02-12 12:58:18 +01:00
Michal Nowak
2fa5727446 Check config.log for ASAN errors
./configure checks might produce a false negative error due to ASAN
errors and thus disable some options.

(cherry picked from commit 0db934d401)
2021-02-09 12:06:05 +01:00
Michal Nowak
9f7669cab3 Check PDF file structure with QPDF
"qpdf --check" checks file structure of generated ARM PDF.

(cherry picked from commit 359708b9d6)
2021-02-03 17:50:08 +01:00
Mark Andrews
48715f6ad4 Look for tsan files in the top build directory 2021-02-02 12:33:19 +00:00
Mark Andrews
0dd5483cb0 Detect overly long CHANGES lines
(cherry picked from commit b1ecab6383)
2021-01-28 15:08:09 +11:00
Ondřej Surý
0e25af628c Use -release instead of -version-info for internal library SONAMEs
The BIND 9 libraries are considered to be internal only and hence the
API and ABI changes a lot.  Keeping track of the API/ABI changes takes
time and it's a complicated matter as the safest way to make everything
stable would be to bump any library in the dependency chain as in theory
if libns links with libdns, and a binary links with both, and we bump
the libdns SOVERSION, but not the libns SOVERSION, the old libns might
be loaded by binary pulling old libdns together with new libdns loaded
by the binary.  The situation gets even more complicated with loading
the plugins that have been compiled with few versions old BIND 9
libraries and then dynamically loaded into the named.

We are picking the safest option possible and usable for internal
libraries - instead of using -version-info that has only a weak link to
BIND 9 version number, we are using -release libtool option that will
embed the corresponding BIND 9 version number into the library name.

That means that instead of libisc.so.1608 (as an example) the library
will now be named libisc-9.16.10.so.

(cherry picked from commit c605d75ea5)
2021-01-25 15:28:09 +01:00
Michal Nowak
13b6a3837f Update Coverity Scan CI job to 2020.09
(cherry picked from commit 7d428be79b)
2021-01-25 12:33:35 +01:00
Michał Kępień
48864361e6 Bump BIND_BASELINE_VERSION for ABI checks 2021-01-21 09:33:16 +01:00
Michal Nowak
4f2dffee99 Drop #1941 workaround
Workaround for issue #1941 is not needed anymore as the underlying
performance issue which manifested on FreeBSD was addressed.

(cherry picked from commit fe5978f5ba)
2021-01-19 11:47:19 +01:00
Michał Kępień
bfdce48781 Bump BIND_BASELINE_VERSION for ABI checks 2020-12-16 22:21:19 +01:00
Ondřej Surý
908f167a5d Bump the clang version to 11 (stable)
(cherry picked from commit c1eb385fdf)
2020-12-08 19:34:12 +01:00
Michal Nowak
b908cc9c79 Remove CentOS 6 from GitLab CI
CentOS 6 reaches EOL on November 30, 2020 and will not be officially
supported by the CentOS project.
2020-11-27 13:29:38 +01:00
Michał Kępień
d29339750e Bump BIND_BASELINE_VERSION for ABI checks 2020-11-26 12:30:25 +01:00
Michał Kępień
ea33d1749c Remove cppcheck 2.0 false positive workarounds
The cppcheck bug which commit 4c2c93c821
works around was fixed in cppcheck 2.2.  Drop the relevant hack from the
definition of the cppcheck GitLab CI job.

(cherry picked from commit f06dfe0397)
2020-11-25 13:21:58 +01:00
Michał Kępień
b02919c4f9 Enable "stress" tests to be run on demand
The "stress" test can be run in different ways, depending on:

  - the tested scenario (authoritative, recursive),
  - the operating system used (Linux, FreeBSD),
  - the architecture used (amd64, arm64).

Currently, all supported "stress" test variants are automatically
launched for all scheduled pipelines and for pipelines started for tags;
there is no possibility of running these tests on demand, which could be
useful in certain circumstances.

Employ the "only:variables" key to enable fine-grained control over the
list of "stress" test jobs to be run for a given pipeline.  Three CI
variables are used to specify the list of "stress" test jobs to create:

  - BIND_STRESS_TEST_MODE: specifies the test mode to use; must be
    explicitly set in order for any "stress" test job to be created;
    allowed values are: "authoritative", "recursive",

  - BIND_STRESS_TEST_OS: specifies the operating system to run the test
    on; allowed values are: "linux", "freebsd"; defaults to "linux", may
    be overridden at pipeline creation time,

  - BIND_STRESS_TEST_ARCH: specifies the architecture to run the test
    on; allowed values are: "amd64", "arm64"; defaults to "amd64", may
    be overridden at pipeline creation time.

Since case-insensitive regular expressions are used for determining
which jobs to run, every variable described above may contain multiple
values.  For example, setting the BIND_STRESS_TEST_MODE variable to
"authoritative,recursive" will cause the "stress" test to be run in both
supported scenarios (either on the default OS/architecture combination,
i.e. Linux/amd64, or, if the relevant variables are explicitly
specified, the requested OS/architecture combinations).

(cherry picked from commit f23094223e)
2020-11-23 11:52:20 +01:00
Michal Nowak
3b0a93c5c8 Enable debug build on Tumbleweed in CI
(cherry picked from commit 59a09b5db8)
2020-11-10 17:29:48 +01:00
Michał Kępień
e5c88a590d Use "image" key in Windows GitLab CI job templates
Our GitLab Runner Custom executor scripts now use the "image" key for
determining the Windows Docker image to use for a given CI job.  Update
.gitlab-ci.yml to reflect that change.

(cherry picked from commit 004ca913f2)
2020-11-05 15:07:00 +01:00
Michal Nowak
f1066b3b41 Update to OpenBSD 6.8
(cherry picked from commit 773649f413)
2020-10-30 10:39:59 +01:00
Michał Kępień
1b5a8a914c Do not test "make depend" for out-of-tree builds
The make/mkdep script does not understand the concept of generated
source files (like lib/dns/dnstap.pb-c.c), which prevents it from
working correctly for out-of-tree builds.  As "make depend" is not
required for building BIND and the "depend" make target was removed
altogether in the development branch, just prevent the "make depend"
check from being performed for out-of-tree builds in GitLab CI instead
of trying to add support for handling generated source files to
make/mkdep.
2020-10-30 08:49:16 +01:00
Michał Kępień
0ab099ca09 Fix the "make depend" check in GitLab CI
"make depend" prints errors to stderr, not to stdout.  This means that
the check for "make depend" errors currently used in the definition of
every build job in GitLab CI could never fail.  Fix that check by
redirecting stderr to stdout.  Also employ tee to prevent the output of
"make depend" from being hidden in the job log.  (While using tee hides
the exit code of "make depend" itself, the next line still checks for
errors anyway.)
2020-10-30 08:49:16 +01:00
Michal Nowak
283f0c1e75 Update to FreeBSD 12.2
(cherry picked from commit 11ab0528d9)
2020-10-29 16:28:01 +01:00
Michal Nowak
91e28d1fb4 Add Fedora 33
(cherry picked from commit 914be61ff8c5a3e0395acd980486c1b4cd656d20)
2020-10-29 14:00:19 +01:00
Michal Nowak
2c9892ed1d Enable Test Coverage Visualization for merge requests
This feature allows GitLab to visualize test coverage information in the
file diff view of merge requests.

This commit makes the gcov CI job depend on the following chain of jobs:

    gcc:buster:amd64 → unit:gcc:buster:amd64 → system:gcc:buster:amd64

The reason for running the last two jobs above sequentially rather than
in parallel is that both of them create *.gcda files (containing
coverage data) in the same locations.  While some way of merging these
files from different job artifact archives could probably be designed
with the help of additional tools, the simplest thing to do is not to
run unit test and system test jobs in parallel, carrying *.gcda files
over between jobs as gcov knows how to append coverage data to existing
*.gcda files.

Also note that test coverage will not be visualized if any of the jobs
in the above dependency chain fails (because the gcov job will not be
run).

(cherry picked from commit 2dabf328c4)
2020-10-27 15:57:06 +01:00
Michal Nowak
06f721fdc5 Add "stress" tests to GitLab CI
Run "stress" tests for scheduled pipelines and pipelines created for
tags.  These tests were previously only performed manually (as part of
pre-release testing of each new BIND version).  Their purpose is to
detect memory leaks and potential performance issues.

As the run time of each "stress" test itself is set to 1 hour, set the
GitLab CI job timeout to 2 hours in order to account for the extra time
needed to set the test up and gather its results.

(cherry picked from commit 39305411e8)
2020-10-26 18:04:53 +01:00
Michał Kępień
f8c9f78684 Bump BIND_BASELINE_VERSION for ABI checks 2020-10-22 09:14:31 +02:00
Michał Kępień
3f28a134cf Bump BIND_BASELINE_VERSION for respdiff tests 2020-10-22 09:14:31 +02:00
Michal Nowak
2ee405d753 Add pairwise testing
Pairwise testing is a test case generation technique based on the
observation that most faults are caused by interactions of at most two
factors.  For BIND, its configure options can be thought of as such
factors.

Process BIND configure options into a model that is subsequently
processed by the PICT tool in order to find an effective test vector.
That test vector is then used for configuring and building BIND using
various combinations of configure options.

(cherry picked from commit 420986bf18)
2020-09-22 11:39:08 +02:00