1 These tests can be used to verify standards compliance of PowerDNS and to
6 We need very recent versions of:
8 * validns (http://www.validns.net/)
9 * ldns-verify-zone (part of ldns)
10 * jdnssec-verifyzone (http://www.verisignlabs.com/dnssec-tools/)
11 * named-checkzone (part of BIND9)
12 * unbound-host (part of unbound)
13 * drill (part of ldns)
18 If you omit the tools above, some tests fail, but you can still run the
26 For a more hands-off approach, make sure PowerDNS is built with suitable
30 ./start-test-stop 5300 gmysql
33 To start PowerDNS in gmysql mode (including DNSSEC), run all tests, and
34 write reports, using udp port 5300 in the process. Use:
37 ./start-test-stop help
40 to see all available suites.
42 In addition to diff-files in all test dirs, start-test-stop generates a jUnit-
43 compatible XML report.
48 Start PowerDNS with `--no-shuffle` for best results - the 'too-big-udp' test
49 fails otherwise, for cosmetical reasons.
54 Each directory contains a command that, when executed, process the 'cleandig'
55 output for the answer the nameserver sent. This output is stored in the file
56 `real_result`, and compared to `expected_result` or one of its replacement
59 Then, `diff -u` is run on those two files, and the output sent to the file
60 `diff`. If everything is as it should be, this diff file is empty, and
61 PowerDNS passed the test.
66 Optional features of the DNS standard can cause a difference to arise. For
67 example, "Bind 8" appears to fail on nearly all our tests, whereas it is in
68 compliance (except for one case).
70 Study the diff output to be sure if there is a problem.
75 See beyond this section for information on how to run automatically.
77 First make sure PowerDNS has access to the testing zones, which are all
78 referred in the `named.conf` file. Use the `zone2sql` tool to create SQL and
79 feed it to your database if you want to test one of the sql backends.
81 Run PowerDNS as (to test gmysql):
84 ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
85 --no-shuffle --launch=gmysql --gmysql-dbname=pdnstest --gmysql-user=root \
86 --fancy-records --query-logging --loglevel=9 \
87 --cache-ttl=0 --no-config
90 or (to test bind, without DNSSEC):
92 ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
93 --no-shuffle --launch=bind --bind-config=./named.conf \
94 --fancy-records --query-logging --loglevel=9 \
95 --cache-ttl=0 --no-config
98 or (to test bind with DNSSEC):
102 ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
103 --no-shuffle --launch=bind --bind-config=./named.conf \
104 --query-logging --loglevel=9 \
105 --cache-ttl=0 --no-config
111 sqlite3 powerdns.sqlite3 < ../pdns/no-dnssec.schema.sqlite3.sql
112 sqlite3 powerdns.sqlite3 < ../pdns/dnssec.schema.sqlite3.sql
113 ../pdns/backends/bind/zone2sql --named-conf=./named.conf --gsqlite \
114 --transactions --dnssec | sqlite3 powerdns.sqlite3
115 echo 'analyze;' | sqlite3 powerdns.sqlite3
117 ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./ \
118 --no-shuffle --launch=gsqlite3 \
119 --gsqlite3-database=./powerdns.sqlite3 --gsqlite3-dnssec \
120 --query-logging --loglevel=9 \
121 --cache-ttl=0 --no-config
124 Set the `nameserver` and `port` variables to point to your pdns\_server
128 nameserver=127.0.0.1 port=5300 ./runtests
135 Failed tests appear in the file `failed_tests`, passed tests in
136 `passed_tests`. A complete log is in the file `log`. Examine the `diff`
137 files in all subdirectories to see what happened.
142 On debian-jessie, most of these tools can be retrieved with:
144 sudo apt-get install validns ldnsutils bind9utils libnet-dns-perl
145 sudo apt-get -t jessie-backports install unbound-host libunbound2
148 libnet-dns-perl is needed for one dyndns test.
150 This does not install the jdnssec-verifyzone tools. The test that will break without that can be disabled with:
152 touch tests/verify-dnssec-zone/allow-missing
155 Getting required daemons from Docker
156 ------------------------------------
158 Please keep in mind that databases may need a few seconds to start up.
162 docker run -p 3306:3306 --rm -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 mariadb
163 GMYSQLHOST=127.0.0.1 ./start-test-stop 5300 gmysql
168 docker run -p 5432:5432 --rm -d postgres
169 GPGSQLUSER=postgres PGHOST=127.0.0.1 ./start-test-stop 5300 gpgsql