knot-dns/tests-extra
David Vašek efef4c7663 tests-extra: ixfr/master_pin2 -- align the servers at the start
Notice:
Both masters send their NOTIFY's to the slave. The slave makes
refresh from the last master which it received NOTIFY from
- it's the current state of Knot DNS design. If a NOTIFY
for lower serial arrives close enough after the previous NOTIFY
for a higher serial from another master, before the slave made
refresh from the first master, the first NOTIFY "knowledge" gets
"overwritten" by the second one with lower serial, resulting
in refresh from the lagging behind master and a rare test failure.
2025-10-31 10:57:27 +01:00
..
data tests: add XoT (XFR over TLS) interop with Bind9 2024-10-23 13:42:43 +02:00
tests tests-extra: ixfr/master_pin2 -- align the servers at the start 2025-10-31 10:57:27 +01:00
tools tests: refactor server configuration routines 2025-10-29 09:22:50 +01:00
.gitignore func-tests: change location 2013-12-19 16:35:31 +01:00
README tests-extra: update prerequisites in README 2024-11-14 08:28:07 +01:00
requirements.txt tests-extra: initial support for testing Knot with Redis backend 2025-09-12 16:50:41 +02:00
runtests.py tests-extra: improve error output if libknot not usable 2024-07-31 17:35:04 +02:00

Prerequisites:
--------------

python3
dnspython >=2.2.0 (python3-dnspython)
psutil            (python3-psutil)
bind9
dnssec-signzone   (bind9-utils)
dnssec-keygen     (bind9-utils)
dnssec-verify     (bind9-utils)
certtool          (gnutls-bin)
ldnsutils
lsof
gawk
objdump
(valgrind)
(gdb)

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

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

Optional loopback addresses configuration:
------------------------------------------

# for i in {1..64}; do sudo ip address add 127.0.1.$i/32 dev lo; done
# for i in {1..64}; do sudo ip address add ::1$i/128 dev lo; done

Ubuntu:
-------

Disable apparmor protection for system Bind:
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.named
or
$ sudo ln -s /etc/apparmor.d/usr.sbin.named /etc/apparmor.d/disable/
$ sudo /etc/init.d/apparmor restart

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

XDP:
----

XDP testing with Valgrind requires running under root. Testing with ASAN is
possible if lsof has two following capabilities:

$ sudo setcap "CAP_SYS_PTRACE,CAP_DAC_OVERRIDE+ep" `which lsof`

And knotd has set:

$ sudo setcap "CAP_NET_RAW,CAP_NET_ADMIN,CAP_SYS_ADMIN,CAP_IPC_LOCK,CAP_SYS_PTRACE+ep" `readlink -f ../src/knotd`

Tcpdump:
--------

$ sudo setcap "CAP_NET_RAW+ep" `which tcpdump`