From c20ca2440575e5cfc9d4a3dd582c9f56776452d6 Mon Sep 17 00:00:00 2001 From: qiaojing Date: Tue, 12 Apr 2011 14:42:29 +0800 Subject: [PATCH] [trac609] --- tools/query_cmp/README | 27 + tools/query_cmp/queries/dquery01 | 394 + tools/query_cmp/queries/dquery01_no-type | 316 + tools/query_cmp/queries/dquery01_non-terminal | 317 + tools/query_cmp/queries/dquery01_nxdomain | 316 + tools/query_cmp/src/lib/compare_rrset.py | 285 + tools/query_cmp/src/lib/handledns.py | 284 + tools/query_cmp/src/lib/read_query.py | 93 + tools/query_cmp/src/query_two_server.py | 102 + tools/query_cmp/zonefile/example.com.txt | 1298 ++++ .../query_cmp/zonefile/example.com.txt.signed | 6858 +++++++++++++++++ 11 files changed, 10290 insertions(+) create mode 100644 tools/query_cmp/README create mode 100644 tools/query_cmp/queries/dquery01 create mode 100644 tools/query_cmp/queries/dquery01_no-type create mode 100644 tools/query_cmp/queries/dquery01_non-terminal create mode 100644 tools/query_cmp/queries/dquery01_nxdomain create mode 100755 tools/query_cmp/src/lib/compare_rrset.py create mode 100755 tools/query_cmp/src/lib/handledns.py create mode 100755 tools/query_cmp/src/lib/read_query.py create mode 100755 tools/query_cmp/src/query_two_server.py create mode 100644 tools/query_cmp/zonefile/example.com.txt create mode 100644 tools/query_cmp/zonefile/example.com.txt.signed diff --git a/tools/query_cmp/README b/tools/query_cmp/README new file mode 100644 index 0000000000..bd3efccc2a --- /dev/null +++ b/tools/query_cmp/README @@ -0,0 +1,27 @@ +This is a tool to compare two DNS server's response to query. + +DIRECTORY STRUCTURE + +zonefile + The file under this directory is for the testee servers + to load before running the test, containing various types + of RRs in the test cases. It is in bind9's format. One + file is signed while the other is not, which you can choose. + +queries + The files under this directory are the input of the test, + involving various types of query cases. + +src + The scripts of this test. + It uses the dns python binding interface of bind10 from the + source tree, so src/lib/dns/python/.libs must be added to + PYTHONPATH environment variable ahead of running the tests. + +RUNNING + +e.g. +cd src +./query_two_server.py -u -f ../queries/dquery01 -s 10.10.1.1 -p 30000 -t 10.10.10.2 -q 30002 > bind10test_normal + +./query_two_server.py --help' for more details diff --git a/tools/query_cmp/queries/dquery01 b/tools/query_cmp/queries/dquery01 new file mode 100644 index 0000000000..923ba7dff2 --- /dev/null +++ b/tools/query_cmp/queries/dquery01 @@ -0,0 +1,394 @@ +# Fields Description +# +#query:ID QR OPCODE AA TC RD RA Z AD CD RCODE QDCOUNT ANCOUNT NSCOUNT ARCOUNT QNAME QTYPE QCLASS +#response:ID QR OPCODE AA TC RD RA Z AD CD RCODE QDCOUNT ANCOUNT NSCOUNT ARCOUNT QNAME QTYPE QCLASS +# := .. +# := NAME TYPE CLASS TTL RDLENGTH +# := ADDRESS | +# NSDNAME | +# MNAME RNAME SERIAL REFRESH RETRY EXPIRE MINIMUM | +# ... +# := .. +# := .. +# +# +# +# Description in BNF (http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form) +# ::=
+#
::= +# +# ::= +# +# ::=
+# ::= +# ::= +# ::= +# ::= { } +# ::= +# ::= | "" +# ::=