knot-dns/tests-extra
Jan Vcelak 2c4ebdffe1 tests-extra: enable additionals checking for selected tests
The Additional section of the answers should be compared with BIND on
expected delegations.

Knot DNS also puts A/AAAA records into the Additional section for NS,
MX, and SRV records.
2015-07-09 15:40:35 +02:00
..
data tests-extra: CNAME loop + fixed basic/query test. 2014-11-11 23:26:52 +01:00
tests tests-extra: enable additionals checking for selected tests 2015-07-09 15:40:35 +02:00
tools tests-extra: exclude Additional section when comparing answers 2015-07-09 15:32:26 +02:00
.gitignore func-tests: change location 2013-12-19 16:35:31 +01:00
Dockerfile Merge branch master into libdnssec 2015-02-04 15:53:53 +01:00
README docker: cleanup in tests-extra 2015-02-03 20:15:19 +01:00
requirements.txt tests: new release of dnspython 2014-09-09 17:46:33 +02:00
runtests.py tests: log interesting environment variables 2014-08-20 19:39:06 +02:00

Prerequisites:
=============
Python >=3.3
python3-dnspython >=1.11.1
psutil (sudo pip3 install psutil)
dnssec-signzone
dnssec-keygen
dnssec-verify
Bind 9.9.x
lsof
gawk
(valgrind)
(gdb)

Python modules:
---------------

To install necessary Python modules using pip, run:
$ pip install -r requirements.txt

Ubuntu:
-------
Disable apparmor protection for system Bind:
# sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.named

Allow ptrace:
# echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
or
change file /etc/sysctl.d/10-ptrace.conf
kernel.yama.ptrace_scope = 0

Running in docker container:
----------------------------

There is a Dockerfile that can be used to build containers with the tests-extra,
the main benefit is that each test runs in an isolated container and can be run in parallel.

Run tests on the upstream branch:
---------------------------------

$ docker pull cznic/knot:tests-extra # Or build with 'docker build -t tests-extra .'
$ docker run -it -v cznic/knot:tests-extra basic

Run tests on the local executables:
-----------------------------------

You can bind-mount the /src with the current working copy.

$ docker run -it -v $(pwd)/..:/knot-src cznic/knot:tests-extra basic