BIND 10 trac2157_2, updated. 56e8f3e3e99557bacd0f4d4a2694f42b2c2f63ef [2157] fix paths with srcdir/buiddir

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Dec 26 06:04:50 UTC 2012


The branch, trac2157_2 has been updated
       via  56e8f3e3e99557bacd0f4d4a2694f42b2c2f63ef (commit)
       via  9371828a3aae06b6a5de33743864bcf3e20162f4 (commit)
      from  72e963ce027a56e814d5404feee00aa0b4a45b15 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 56e8f3e3e99557bacd0f4d4a2694f42b2c2f63ef
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Wed Dec 26 15:00:34 2012 +0900

    [2157] fix paths with srcdir/buiddir

commit 9371828a3aae06b6a5de33743864bcf3e20162f4
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Tue Dec 25 21:10:44 2012 +0900

    [2157] added a new terrain to unify a set of expected items

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/Makefile.am                           |    2 +-
 src/bin/auth/tests/Makefile.am                     |    2 +-
 .../configurations/example.org.inmem.config        |    1 +
 tests/lettuce/features/queries.feature             |  527 ++++----------------
 tests/lettuce/features/terrain/bind10_control.py   |   42 ++
 5 files changed, 132 insertions(+), 442 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/Makefile.am b/src/bin/auth/Makefile.am
index df9a354..eefb3cb 100644
--- a/src/bin/auth/Makefile.am
+++ b/src/bin/auth/Makefile.am
@@ -29,7 +29,7 @@ EXTRA_DIST = $(man_MANS) b10-auth.xml
 if GENERATE_DOCS
 
 b10-auth.8: b10-auth.xml
-	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-auth.xml
+	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(builddir)/b10-auth.xml
 
 else
 
diff --git a/src/bin/auth/tests/Makefile.am b/src/bin/auth/tests/Makefile.am
index 609164b..f39529d 100644
--- a/src/bin/auth/tests/Makefile.am
+++ b/src/bin/auth/tests/Makefile.am
@@ -82,7 +82,7 @@ EXTRA_DIST = statisticsitems.py
 
 check-local:
 	B10_FROM_BUILD=${abs_top_builddir} ./run_unittests
-	$(PYTHON) ./statisticsitems.py $(top_builddir)/src/bin/auth/b10-auth.xml
+	$(PYTHON) $(srcdir)/statisticsitems.py $(top_builddir)/src/bin/auth/b10-auth.xml
 
 noinst_PROGRAMS = run_unittests
 
diff --git a/tests/lettuce/configurations/example.org.inmem.config b/tests/lettuce/configurations/example.org.inmem.config
index 48f4379..1375fa6 100644
--- a/tests/lettuce/configurations/example.org.inmem.config
+++ b/tests/lettuce/configurations/example.org.inmem.config
@@ -27,6 +27,7 @@
         }
     },
     "Stats": {
+        "poll-interval": 1
     },
     "Boss": {
         "components": {
diff --git a/tests/lettuce/features/queries.feature b/tests/lettuce/features/queries.feature
index 834b425..eecf1f9 100644
--- a/tests/lettuce/features/queries.feature
+++ b/tests/lettuce/features/queries.feature
@@ -18,48 +18,12 @@ Feature: Querying feature
         And bind10 module Xfrin should not be running
         And bind10 module StatsHttpd should not be running
 
+        And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+        And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 0
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones
 
         A query for www.example.org should have rcode NOERROR
         The last query response should have flags qr aa rd
@@ -87,46 +51,15 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 1
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 1
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 1
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 1
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 1
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name              | item_value |
+          | _SERVER_.request.v4    |          1 |
+          | _SERVER_.request.udp   |          1 |
+          | _SERVER_.opcode.query  |          1 |
+          | _SERVER_.responses     |          1 |
+          | _SERVER_.qrysuccess    |          1 |
+          | _SERVER_.qryauthans    |          1 |
+          | _SERVER_.rcode.noerror |          1 |
 
 
         # Repeat of the above
@@ -156,46 +89,15 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 2
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 2
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 2
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 2
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 2
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 2
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 2
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name              | item_value |
+          | _SERVER_.request.v4    |          2 |
+          | _SERVER_.request.udp   |          2 |
+          | _SERVER_.opcode.query  |          2 |
+          | _SERVER_.responses     |          2 |
+          | _SERVER_.qrysuccess    |          2 |
+          | _SERVER_.qryauthans    |          2 |
+          | _SERVER_.rcode.noerror |          2 |
 
         # And now query something completely different
         A query for nosuchname.example.org should have rcode NXDOMAIN
@@ -213,46 +115,16 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 3
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 3
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 3
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 3
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 2
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 3
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 2
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 1
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name               | item_value |
+          | _SERVER_.request.v4     |          3 |
+          | _SERVER_.request.udp    |          3 |
+          | _SERVER_.opcode.query   |          3 |
+          | _SERVER_.responses      |          3 |
+          | _SERVER_.qrysuccess     |          2 |
+          | _SERVER_.qryauthans     |          3 |
+          | _SERVER_.rcode.noerror  |          2 |
+          | _SERVER_.rcode.nxdomain |          1 |
 
     Scenario: ANY query
         Given I have bind10 running with configuration example.org.inmem.config
@@ -268,48 +140,12 @@ Feature: Querying feature
         And bind10 module Xfrin should not be running
         And bind10 module StatsHttpd should not be running
 
+        And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+        And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 0
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones
 
         A query for example.org type ANY should have rcode NOERROR
         The last query response should have flags qr aa rd
@@ -335,46 +171,15 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 1
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 1
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 1
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 1
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 1
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name              | item_value |
+          | _SERVER_.request.v4    |          1 |
+          | _SERVER_.request.udp   |          1 |
+          | _SERVER_.opcode.query  |          1 |
+          | _SERVER_.responses     |          1 |
+          | _SERVER_.qrysuccess    |          1 |
+          | _SERVER_.qryauthans    |          1 |
+          | _SERVER_.rcode.noerror |          1 |
 
     Scenario: Delegation query for unsigned child zone
         Given I have bind10 running with configuration example.org.inmem.config
@@ -382,48 +187,12 @@ Feature: Querying feature
         And wait for bind10 stderr message CMDCTL_STARTED
         And wait for bind10 stderr message AUTH_SERVER_STARTED
 
+        And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+        And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 0
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones
 
         A dnssec query for www.sub.example.org type AAAA should have rcode NOERROR
         The last query response should have flags qr rd
@@ -445,46 +214,18 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 1
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 1
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 1
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 1
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 1
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 1
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name                  | item_value |
+          | _SERVER_.request.v4        |          1 |
+          | _SERVER_.request.udp       |          1 |
+          | _SERVER_.request.edns0     |          1 |
+          | _SERVER_.request.dnssec_ok |          1 |
+          | _SERVER_.opcode.query      |          1 |
+          | _SERVER_.responses         |          1 |
+          | _SERVER_.response.edns0    |          1 |
+          | _SERVER_.qrynoauthans      |          1 |
+          | _SERVER_.qryreferral       |          1 |
+          | _SERVER_.rcode.noerror     |          1 |
 
     Scenario: SSHFP query
         # We are testing one more RR type for a normal successful case
@@ -501,94 +242,30 @@ Feature: Querying feature
         And bind10 module Xfrin should not be running
         And bind10 module StatsHttpd should not be running
 
+        And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+        And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 0
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 0
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones
 
         A query for example.org type SSHFP should have rcode NOERROR
         The last query response should have ancount 0
 
+        And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+        And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 1
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 1
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 1
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 0
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 1
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 1
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 1
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name              | item_value |
+          | _SERVER_.request.v4    |          1 |
+          | _SERVER_.request.udp   |          1 |
+          | _SERVER_.opcode.query  |          1 |
+          | _SERVER_.responses     |          1 |
+          | _SERVER_.qryauthans    |          1 |
+          | _SERVER_.qrynxrrset    |          1 |
+          | _SERVER_.rcode.noerror |          1 |
 
         A query for shell.example.org type SSHFP should have rcode NOERROR
         The last query response should have ancount 1
@@ -602,43 +279,13 @@ Feature: Querying feature
 
         When I query statistics zones of bind10 module Auth
         last bindctl output should not contain "error"
-        Then the statistics counter v4 in the category request for the zone _SERVER_ should be 2
-        Then the statistics counter v6 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter udp in the category request for the zone _SERVER_ should be 2
-        Then the statistics counter tcp in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badednsver in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter badsig in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter dnssec_ok in the category request for the zone _SERVER_ should be 0
-        Then the statistics counter query in the category opcode for the zone _SERVER_ should be 2
-        Then the statistics counter iquery in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter status in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter notify in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter update in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category opcode for the zone _SERVER_ should be 0
-        Then the statistics counter responses for the zone _SERVER_ should be 2
-        Then the statistics counter truncated in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter edns0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter tsig in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter sig0 in the category response for the zone _SERVER_ should be 0
-        Then the statistics counter qrysuccess for the zone _SERVER_ should be 1
-        Then the statistics counter qryauthans for the zone _SERVER_ should be 2
-        Then the statistics counter qrynoauthans for the zone _SERVER_ should be 0
-        Then the statistics counter qryreferral for the zone _SERVER_ should be 0
-        Then the statistics counter qrynxrrset for the zone _SERVER_ should be 1
-        Then the statistics counter authqryrej for the zone _SERVER_ should be 0
-        Then the statistics counter noerror in the category rcode for the zone _SERVER_ should be 2
-        Then the statistics counter formerr in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter servfail in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notimp in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter refused in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxdomain in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter yxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter nxrrset in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notauth in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter notzone in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter badvers in the category rcode for the zone _SERVER_ should be 0
-        Then the statistics counter other in the category rcode for the zone _SERVER_ should be 0
+        Then the statistics counters are 0 in category .Auth.zones except for the following items
+          | item_name              | item_value |
+          | _SERVER_.request.v4    |          2 |
+          | _SERVER_.request.udp   |          2 |
+          | _SERVER_.opcode.query  |          2 |
+          | _SERVER_.responses     |          2 |
+          | _SERVER_.qrysuccess    |          1 |
+          | _SERVER_.qryauthans    |          2 |
+          | _SERVER_.qrynxrrset    |          1 |
+          | _SERVER_.rcode.noerror |          2 |
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 394d18a..2bbf30e 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -440,3 +440,45 @@ def check_statistics(step, counter, category, zone, gtltbt, number, upper):
         assert int(found) < int(number), msg
     else:
         assert int(found) == int(number), msg
+
+ at step('the statistics counters are 0 in category (\S+)( except for the' + \
+          ' following items)?')
+def check_statistics_items(step, category, has_except_for):
+    """
+    check the output of bindctl for statistics of specified counter.
+    Parameters:
+    category ('category <category>'): The category of counter.
+    has_except_for ('except for the following items'): checks values of items
+        with the multiline part.
+
+    Expected values of items are taken from the multiline part of the step in
+    the scenario. The multiline part has two columns: item_name and item_value.
+    item_name is a relative name to category. item_value is an expected value
+    for item_name.
+    """
+
+    def flatten(dictionary, prefix=''):
+        h = {}
+        for k, v in dictionary.items():
+            if type(v) is dict:
+                h.update(flatten(v, prefix+'.'+k))
+            else:
+                h[prefix+'.'+k] = v
+        return h
+
+    stats = flatten(parse_bindctl_output_as_data_structure())
+    if has_except_for:
+        for item in step.hashes:
+            name = category+'.'+item['item_name']
+            value = item['item_value']
+            assert stats.has_key(name), \
+                'Statistics item %s was not found' % (name)
+            found = stats[name]
+            assert int(found) == int(value), \
+                'Statistics item %s has unexpected value %s (expect %s)' % \
+                    (name, found, value)
+            del(stats[name])
+    for name, found in stats.items():
+        assert int(found) == 0, \
+            'Statistics item %s has unexpected value %s (expect %s)' % \
+                (name, found, 0)



More information about the bind10-changes mailing list