Find file History
Pull request Compare This branch is 297 commits behind Habbie:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
00dnssec-grabkeys
any-nxdomain
any-query
any-wildcard-dnssec
any-wildcard
apex-level-a-but-no-a
apex-level-a
apex-level-ns
basic-a-resolution
basic-aaaa-resolution
basic-hinfo
basic-loc
basic-ns-resolution
basic-soa-resolution
basic-srv
basic-txt-resolution
big-axfr
cname-and-wildcard-at-root
cname-and-wildcard-but-no-correct-type
cname-and-wildcard
cname-but-no-correct-type
cname-loop-breakout
cname-to-nxdomain-any
cname-to-nxdomain
cname-to-referral
cname-to-unauth-any
cname-to-unauth
cname-wildcard-chain
cross-domain-cname-to-wildcard
direct-wildcard
double-srv
double
ds-at-secure-delegation
ds-at-unsecure-delegation
ds-at-unsecure-zone-cut
ds-inside-delegation
ent-any
ent-axfr
ent-rr-enclosed-in-ent
ent-soa
ent-wildcard-below-ent
ent
external-cname-pointer
fancy-axfr
five-levels-wildcard-one-below-apex
five-levels-wildcard
glue-record
glue-referral
internal-referral
long-name
mboxfw-record
minimal-noerror
minimal-nxdomain
multi-step-cname-resolution
multi-txt-escape-resolution
multi-txt-resolution
mx-case-sensitivy-with-ap
mx-to-cname
mx-with-simple-additional-processing
naptr
non-existing-record-other-types-exist-ns
non-existing-record-other-types-exist
ns-at-delegation
ns-with-identical-glue
nsec-bitmap
nsec-glue-at-delegation
nsec-glue
nsec-middle
nsec-wildcard
nsec-wraparound
nsec-wrong-type-at-apex
nsec-wrong-type
nxdomain-below-nonempty-terminal
nxdomain-for-unknown-record
obscured-wildcard
one-step-cname-resolution
out-of-bailiwick-referral
pretty-big-packet
rp
same-level-referral-soa
same-level-referral
second-level-nxdomain
secure-delegation
too-big-for-udp-query-no-truncate-additional
too-big-for-udp-query
two-level-nxdomain
underscore-sorting
unknown-domain
url-record
very-long-txt
wildcard-overlaps-delegation
wrong-type-wildcard
.gitignore
Kexample.com.+005.65490.private
README
bind-dnssec-setup
cleandig
delegated.dnssec-parent.com
dnssec-parent.com
example.com
minimal.com
named.conf
pdns.conf
powerdnssec.org
recursor-test
results
runtests
start-test-stop
test.com
totar
toxml
wtest.com

README

These tests can be used to verify standards compliance of PowerDNS and to
spot regressions.

Start PowerDNS with --no-shuffle for best results - the 'too-big-udp' test
fails otherwise, for cosmetical reasons.

Method of operation
-------------------

Each directory contains a command that, when executed, proces the 'cleandig'
output for the answer the nameserver sent. This output is stored in the file
'real_result', and compared to 'expected_result' or one of its replacement
files.

Then, 'diff -u' is run on those two files, and the output sent to the file
'diff'. If everything is as it should be, this diff file is empty, and
PowerDNS passed the test.

Caveats
-------

Optional features of the DNS standard can cause a difference to arrise. For
example, 'Bind 8' appears to fail on nearly all our tests, whereas it is in
compliance (except for one case).

Study the diff output to be sure if there is a problem.

How to run
----------

See beyond this section for information on how to run automatically.

First make sure PowerDNS has access to the testing zones, which are all
referred in the 'named.conf' file. Use the 'zone2sql' tool to create sql and
feed it to your database if you want to test one of the sql backends.

Run PowerDNS as (to test gmysql):

$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./  \
--no-shuffle --launch=gmysql --gmysql-dbname=pdnstest --gmysql-user=root \
--fancy-records --query-logging --send-root-referral --loglevel=9 \
--cache-ttl=0 --no-config

or (to test bind, without DNSSEC):
$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./  \
--no-shuffle --launch=bind --bind-config=./named.conf                \
--fancy-records --query-logging --send-root-referral --loglevel=9    \
--cache-ttl=0 --no-config

or (to test bind with DNSSEC):

$ ./bind-dnssec-setup
$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./  \
--no-shuffle --launch=bind --bind-config=./named.conf                \
--query-logging --send-root-referral --loglevel=9                    \
--cache-ttl=0 --no-config

Or only sqlite3:

rm powerdns.sqlite3
sqlite3 powerdns.sqlite3 < ../pdns/no-dnssec.schema.sqlite3.sql
sqlite3 powerdns.sqlite3 < ../pdns/dnssec.schema.sqlite3.sql
../pdns/backends/bind/zone2sql --named-conf=./named.conf --gsqlite \
--transactions --dnssec | sqlite3 powerdns.sqlite3
echo 'analyze;' | sqlite3 powerdns.sqlite3


$ ../pdns/pdns_server --daemon=no --local-port=5300 --socket-dir=./  \
--no-shuffle --launch=gsqlite3 \
--gsqlite3-database=./powerdns.sqlite3 --gsqlite3-dnssec             \
--query-logging --send-root-referral --loglevel=9                    \
--cache-ttl=0 --no-config


Set the 'nameserver' and 'port' variables to point to your pdns_server
instance:

$ nameserver=127.0.0.1 port=5300 ./runtests

The BIND backend can't do MBOXFW. The 'any-query' test is known to fail
with bind,gsqlite3.

Automated tests
---------------

For a more hands-off approach, make sure PowerDNS is built with suitable
modules, and use:

$ ./start-test-stop 5300 gmysql

To start PowerDNS in gmysql mode (including DNSSEC), run all tests, and
write reports, using udp port 5300 in the process. Use:

$ ./start-test-stop help

to see all available suites.

In addition to diff-files in all test dirs, start-test-stop generates a jUnit-
compatible XML report.

Analysing results
-----------------

Failed tests appear in the file 'failed_tests', passed tests in
'passed_tests'. A complete log is in the file 'log'. Examine the 'diff'
files in all subdirectories to see what happened.