BIND 10 trac2796, updated. bb08c0bcb4791c3c39f68ae8cefc2e9402ae9b92 [2796] compare with Opcode object instead of a numeric code

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 6 06:47:40 UTC 2013


The branch, trac2796 has been updated
       via  bb08c0bcb4791c3c39f68ae8cefc2e9402ae9b92 (commit)
       via  d2460249eb2a7340b8adbdf12306744ba255eb6d (commit)
      from  89b1ca9494abdcaf3ef2beec3fcb015b3328fea7 (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 bb08c0bcb4791c3c39f68ae8cefc2e9402ae9b92
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Thu Jun 6 14:16:30 2013 +0900

    [2796] compare with Opcode object instead of a numeric code

commit d2460249eb2a7340b8adbdf12306744ba255eb6d
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date:   Thu Jun 6 13:50:38 2013 +0900

    [2796] revert fdb231c partially: check for log messages
    
    Make sure that Auth received 'getstats' command and replied to it.

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

Summary of changes:
 src/bin/auth/statistics.cc.pre         |    6 ++---
 tests/lettuce/features/queries.feature |   44 ++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/statistics.cc.pre b/src/bin/auth/statistics.cc.pre
index ec39db6..14341fe 100644
--- a/src/bin/auth/statistics.cc.pre
+++ b/src/bin/auth/statistics.cc.pre
@@ -138,11 +138,9 @@ Counters::incRequest(const MessageAttributes& msgattrs) {
     // if a short message which does not contain DNS header is received, or
     // a response message (i.e. QR bit is set) is received.
     if (opcode) {
-        const int code = opcode.get().getCode();
-        server_msg_counter_.inc(opcode_to_msgcounter[code]);
+        server_msg_counter_.inc(opcode_to_msgcounter[opcode->getCode()]);
 
-        // Opcode = 0: Query
-        if (code == Opcode::QUERY_CODE) {
+        if (opcode.get() == Opcode::QUERY()) {
             // Recursion Desired bit
             if (msgattrs.requestHasRD()) {
                 server_msg_counter_.inc(MSG_QRYRECURSION);
diff --git a/tests/lettuce/features/queries.feature b/tests/lettuce/features/queries.feature
index eb640cf..5fd0d58 100644
--- a/tests/lettuce/features/queries.feature
+++ b/tests/lettuce/features/queries.feature
@@ -66,6 +66,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_
@@ -98,6 +102,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -140,6 +148,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -170,6 +182,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -201,6 +217,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_
@@ -231,6 +251,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -252,6 +276,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_
@@ -278,6 +306,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -311,6 +343,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_
@@ -325,6 +361,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items
@@ -350,6 +390,10 @@ Feature: Querying feature
         When I wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
         # make sure Auth module receives a command
         And wait for new bind10 stderr message AUTH_RECEIVED_COMMAND
+        # make sure Auth module replied to the command
+        And wait for new bind10 stderr message CC_REPLY
+        # make sure the response is for 'getstats'
+        And wait for new bind10 stderr message v4
         Then I query statistics zones of bind10 module Auth
         And last bindctl output should not contain "error"
         The statistics counters are 0 in category .Auth.zones._SERVER_ except for the following items



More information about the bind10-changes mailing list