BIND 10 trac2157_2, updated. 644541309f301c6f86495db3982eb5ba69b40529 [2157] removed unused parameter
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Dec 26 11:27:54 UTC 2012
The branch, trac2157_2 has been updated
via 644541309f301c6f86495db3982eb5ba69b40529 (commit)
via 76759ae07db6edb36cc063ef1f89e247d910275a (commit)
via cb24062bb3a9d55e5a22098f526172f130a50d60 (commit)
via 370c09f6e3b2d4141ed573bfbab6e39302d670b7 (commit)
via 7eb39cf5f50a31ccd80d6373074301f5caeb088c (commit)
via 566a0c71ebbdeee3981152aa0d98e53a4eba102a (commit)
via 9d1691533c1bbce4518ddbe617b6e2b24ff532ea (commit)
via 3eb8564cd9f9dc2b05b25da7d837a742acb7a860 (commit)
via c7de383107b3644fb0fb941341b369f8693e9382 (commit)
via d4e61c261d0af6db6da47bba2b1cac1ecf4ce002 (commit)
from 56e8f3e3e99557bacd0f4d4a2694f42b2c2f63ef (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 644541309f301c6f86495db3982eb5ba69b40529
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 20:19:21 2012 +0900
[2157] removed unused parameter
commit 76759ae07db6edb36cc063ef1f89e247d910275a
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 20:10:42 2012 +0900
[2157] throw an exception instead of assert for invalid parameter
commit cb24062bb3a9d55e5a22098f526172f130a50d60
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 20:01:30 2012 +0900
[2157] remove unnecessary explicit initialization
commit 370c09f6e3b2d4141ed573bfbab6e39302d670b7
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 19:16:02 2012 +0900
[2157] renamed enum type name
commit 7eb39cf5f50a31ccd80d6373074301f5caeb088c
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 19:07:21 2012 +0900
[2157] remove using declaration from statistics.h
commit 566a0c71ebbdeee3981152aa0d98e53a4eba102a
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 19:02:43 2012 +0900
[2157] use boost::optional for Opcode in MessageAttributes
commit 9d1691533c1bbce4518ddbe617b6e2b24ff532ea
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 17:52:12 2012 +0900
[2157] removed TODO comment.
commit 3eb8564cd9f9dc2b05b25da7d837a742acb7a860
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 17:46:01 2012 +0900
[2157] renamed af to ipversion
commit c7de383107b3644fb0fb941341b369f8693e9382
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 17:37:28 2012 +0900
[2157] use EXPECT_DEATH_IF_SUPPORTED instead of checking with ifdef
commit d4e61c261d0af6db6da47bba2b1cac1ecf4ce002
Author: Yoshitaka Aharen <aharen at jprs.co.jp>
Date: Wed Dec 26 17:25:25 2012 +0900
[2157] brush up lettuce scnario
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/auth_srv.cc | 8 +-
src/bin/auth/b10-auth.xml.pre | 2 -
src/bin/auth/statistics.cc.pre | 75 +++++---
src/bin/auth/statistics.h | 48 +++--
src/bin/auth/tests/statistics_unittest.cc.pre | 49 +++--
tests/lettuce/features/queries.feature | 221 ++++++++++------------
tests/lettuce/features/terrain/bind10_control.py | 2 +-
7 files changed, 210 insertions(+), 195 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 0c36698..ff1e90a 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -254,8 +254,7 @@ public:
OutputBuffer& buffer,
auto_ptr<TSIGContext> tsig_context,
MessageAttributes& stats_attrs);
- bool processUpdate(const IOMessage& io_message,
- MessageAttributes& stats_attrs);
+ bool processUpdate(const IOMessage& io_message);
IOService io_service_;
@@ -596,7 +595,7 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
tsig_context, stats_attrs);
} else if (opcode == Opcode::UPDATE()) {
if (impl_->ddns_forwarder_) {
- send_answer = impl_->processUpdate(io_message, stats_attrs);
+ send_answer = impl_->processUpdate(io_message);
} else {
makeErrorMessage(impl_->renderer_, message, buffer,
Rcode::NOTIMP(), stats_attrs, tsig_context);
@@ -828,8 +827,7 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message,
}
bool
-AuthSrvImpl::processUpdate(const IOMessage& io_message,
- MessageAttributes&)
+AuthSrvImpl::processUpdate(const IOMessage& io_message)
{
// Push the update request to a separate process via the forwarder.
// On successful push, the request shouldn't be responded from b10-auth,
diff --git a/src/bin/auth/b10-auth.xml.pre b/src/bin/auth/b10-auth.xml.pre
index 46ff2f0..45fb684 100644
--- a/src/bin/auth/b10-auth.xml.pre
+++ b/src/bin/auth/b10-auth.xml.pre
@@ -196,8 +196,6 @@
<!-- ### STATISTICS DATA PLACEHOLDER ### -->
-<!-- TODO: missing stats docs. See ticket #1721 -->
-
</refsect1>
<refsect1>
diff --git a/src/bin/auth/statistics.cc.pre b/src/bin/auth/statistics.cc.pre
index d87e7a5..707a9ba 100644
--- a/src/bin/auth/statistics.cc.pre
+++ b/src/bin/auth/statistics.cc.pre
@@ -151,8 +151,15 @@ Counters::incRequest(const MessageAttributes& msgattrs) {
}
// OPCODE
- server_msg_counter_.inc(
- opcode_to_msgcounter[msgattrs.getRequestOpCode().getCode()]);
+ try {
+ server_msg_counter_.inc(
+ opcode_to_msgcounter[msgattrs.getRequestOpCode().getCode()]);
+ } catch (const isc::InvalidOperation& ex) {
+ // The exception will be thrown if OpCode is not set
+ // (e.g. message is short).
+ // Increment MSG_OPCODE_OTHER.
+ server_msg_counter_.inc(MSG_OPCODE_OTHER);
+ }
}
void
@@ -191,39 +198,47 @@ Counters::incResponse(const MessageAttributes& msgattrs,
server_msg_counter_.inc(MSG_REQUEST_BADEDNSVER);
}
- if (msgattrs.getRequestOpCode() == Opcode::QUERY()) {
- // compound attributes
- const unsigned int answer_rrs =
- response.getRRCount(Message::SECTION_ANSWER);
- const bool is_aa_set = response.getHeaderFlag(Message::HEADERFLAG_AA);
-
- if (is_aa_set) {
- // QryAuthAns
- server_msg_counter_.inc(MSG_QRYAUTHANS);
- } else {
- // QryNoAuthAns
- server_msg_counter_.inc(MSG_QRYNOAUTHANS);
- }
-
- if (rcode == Rcode::NOERROR_CODE) {
- if (answer_rrs > 0) {
- // QrySuccess
- server_msg_counter_.inc(MSG_QRYSUCCESS);
+ try {
+ if (msgattrs.getRequestOpCode() == Opcode::QUERY()) {
+ // compound attributes
+ const unsigned int answer_rrs =
+ response.getRRCount(Message::SECTION_ANSWER);
+ const bool is_aa_set =
+ response.getHeaderFlag(Message::HEADERFLAG_AA);
+
+ if (is_aa_set) {
+ // QryAuthAns
+ server_msg_counter_.inc(MSG_QRYAUTHANS);
} else {
- if (is_aa_set) {
- // QryNxrrset
- server_msg_counter_.inc(MSG_QRYNXRRSET);
+ // QryNoAuthAns
+ server_msg_counter_.inc(MSG_QRYNOAUTHANS);
+ }
+
+ if (rcode == Rcode::NOERROR_CODE) {
+ if (answer_rrs > 0) {
+ // QrySuccess
+ server_msg_counter_.inc(MSG_QRYSUCCESS);
} else {
- // QryReferral
- server_msg_counter_.inc(MSG_QRYREFERRAL);
+ if (is_aa_set) {
+ // QryNxrrset
+ server_msg_counter_.inc(MSG_QRYNXRRSET);
+ } else {
+ // QryReferral
+ server_msg_counter_.inc(MSG_QRYREFERRAL);
+ }
+ }
+ } else if (rcode == Rcode::REFUSED_CODE) {
+ if (!response.getHeaderFlag(Message::HEADERFLAG_RD)) {
+ // AuthRej
+ server_msg_counter_.inc(MSG_QRYREJECT);
}
- }
- } else if (rcode == Rcode::REFUSED_CODE) {
- if (!response.getHeaderFlag(Message::HEADERFLAG_RD)) {
- // AuthRej
- server_msg_counter_.inc(MSG_QRYREJECT);
}
}
+ } catch (const isc::InvalidOperation& ex) {
+ // The exception will be thrown if OpCode is not set
+ // (e.g. message is short).
+ // Do not increment the counters above since they are incremented
+ // only if Opcode is Query.
}
}
diff --git a/src/bin/auth/statistics.h b/src/bin/auth/statistics.h
index 3107a13..2b294f2 100644
--- a/src/bin/auth/statistics.h
+++ b/src/bin/auth/statistics.h
@@ -23,6 +23,7 @@
#include <statistics/counter.h>
#include <boost/noncopyable.hpp>
+#include <boost/optional.hpp>
#include <bitset>
@@ -32,8 +33,6 @@ namespace isc {
namespace auth {
namespace statistics {
-using isc::dns::Opcode;
-
/// \brief DNS Message attributes for statistics.
///
/// This class holds some attributes related to a DNS message
@@ -41,23 +40,23 @@ using isc::dns::Opcode;
class MessageAttributes {
public:
/// \brief IP version of DNS message.
- enum IPVersion {
+ enum IPVersionType {
IP_VERSION_UNSPEC, // (initial value; internal use only)
IP_VERSION_IPV4, ///< IPv4 message
IP_VERSION_IPV6 ///< IPv6 message
};
/// \brief Transport protocol of DNS message.
- enum TransportProtocol {
+ enum TransportProtocolType {
TRANSPORT_UNSPEC, // (initial value; internal use only)
TRANSPORT_UDP, ///< UDP message
TRANSPORT_TCP ///< TCP message
};
private:
// request attributes
- IPVersion req_ip_version_; // IP version
- TransportProtocol req_transport_protocol_; // Transport layer protocol
- Opcode req_opcode_; // OpCode
+ IPVersionType req_ip_version_; // IP version
+ TransportProtocolType req_transport_protocol_; // Transport layer protocol
+ boost::optional<isc::dns::Opcode> req_opcode_; // OpCode
enum BitAttributes {
REQ_IS_EDNS_0, // request is EDNS ver.0
REQ_IS_DNSSEC_OK, // DNSSEC OK (DO) bit is set in request
@@ -74,53 +73,60 @@ public:
/// \throw None
MessageAttributes() :
req_ip_version_(IP_VERSION_UNSPEC),
- req_transport_protocol_(TRANSPORT_UNSPEC),
- req_opcode_(Opcode::RESERVED15_CODE), bit_attributes_()
+ req_transport_protocol_(TRANSPORT_UNSPEC)
{}
/// \brief Return request opcode.
/// \return opcode of the request
- /// \throw None
- const Opcode& getRequestOpCode() const {
- return (req_opcode_);
+ /// \throw isc::InvalidOperation Opcode is not set
+ const isc::dns::Opcode& getRequestOpCode() const {
+ if (req_opcode_) {
+ return (req_opcode_.get());
+ } else {
+ isc_throw(isc::InvalidOperation, "Opcode is not set");
+ }
}
/// \brief Set request opcode.
/// \param opcode Opcode of the request
/// \throw None
- void setRequestOpCode(const Opcode& opcode) {
+ void setRequestOpCode(const isc::dns::Opcode& opcode) {
req_opcode_ = opcode;
}
/// \brief Return IP version carrying the request.
/// \return IP version carrying the request
/// \throw None
- IPVersion getRequestIPVersion() const {
+ IPVersionType getRequestIPVersion() const {
return (req_ip_version_);
}
/// \brief Set IP version carrying the request.
/// \param ip_version IP version carrying the request
- /// \throw None
- void setRequestIPVersion(const IPVersion ip_version) {
- assert(ip_version != IP_VERSION_UNSPEC);
+ /// \throw isc::InvalidParameter ip_version is invalid
+ void setRequestIPVersion(const IPVersionType ip_version) {
+ if (ip_version == IP_VERSION_UNSPEC) {
+ isc_throw(isc::InvalidParameter, "Invalid IP version");
+ }
req_ip_version_ = ip_version;
}
/// \brief Return transport protocol carrying the request.
/// \return Transport protocol carrying the request
/// \throw None
- TransportProtocol getRequestTransportProtocol() const {
+ TransportProtocolType getRequestTransportProtocol() const {
return (req_transport_protocol_);
}
/// \brief Set transport protocol carrying the request.
/// \param transport_protocol Transport protocol carrying the request
- /// \throw None
+ /// \throw isc::InvalidParameter transport_protocol is invalid
void setRequestTransportProtocol(
- const TransportProtocol transport_protocol)
+ const TransportProtocolType transport_protocol)
{
- assert(transport_protocol != TRANSPORT_UNSPEC);
+ if (transport_protocol == TRANSPORT_UNSPEC) {
+ isc_throw(isc::InvalidParameter, "Invalid transport protocol");
+ }
req_transport_protocol_ = transport_protocol;
}
diff --git a/src/bin/auth/tests/statistics_unittest.cc.pre b/src/bin/auth/tests/statistics_unittest.cc.pre
index dabb556..ac37de1 100644
--- a/src/bin/auth/tests/statistics_unittest.cc.pre
+++ b/src/bin/auth/tests/statistics_unittest.cc.pre
@@ -112,20 +112,27 @@ buildSkeletonMessage(MessageAttributes& msgattrs) {
TEST_F(CountersTest, invalidParameter) {
MessageAttributes msgattrs;
- // Note: Not all systems have EXPECT_DEATH. As it is a macro we can just
- // test for its presence and bypass the test if not available.
-#ifdef EXPECT_DEATH
- // Passing *_UNSPEC should trigger an assertion failure.
- // Note that we just check that it dies - we don't check what message is
- // output.
- EXPECT_DEATH(
+ // Passing *_UNSPEC should trigger throwing an exception
+ // isc::InvalidParameter.
+ EXPECT_THROW(
msgattrs.setRequestIPVersion(MessageAttributes::IP_VERSION_UNSPEC),
- ".*");
- EXPECT_DEATH(
+ isc::InvalidParameter);
+ EXPECT_THROW(
msgattrs.setRequestTransportProtocol(
MessageAttributes::TRANSPORT_UNSPEC),
- ".*");
-#endif
+ isc::InvalidParameter);
+}
+
+TEST_F(CountersTest, invalidOperationForGetRequestOpCode) {
+ MessageAttributes msgattrs;
+
+ // getRequestOpCode() will throw isc::InvalidOperation when called before
+ // opcode is set with setRequestOpCode().
+ EXPECT_THROW(msgattrs.getRequestOpCode(), isc::InvalidOperation);
+
+ msgattrs.setRequestOpCode(Opcode::QUERY());
+ // getRequestOpCode() will not throw at this point.
+ EXPECT_NO_THROW(msgattrs.getRequestOpCode());
}
TEST_F(CountersTest, incrementResponse) {
@@ -167,23 +174,25 @@ TEST_F(CountersTest, incrementProtocolType) {
std::map<std::string, int> expect;
// Test these patterns:
- // af protocol
+ // ipversion protocol
// -----------------
- // ipv4 udp
- // ipv6 udp
- // ipv4 tcp
- // ipv6 tcp
+ // ipv4 udp
+ // ipv6 udp
+ // ipv4 tcp
+ // ipv6 tcp
int count_v4 = 0, count_v6 = 0, count_udp = 0, count_tcp = 0;
for (int i = 0; i < 4; ++i) {
- const enum MessageAttributes::IPVersion af = (i & 1) != 0 ?
+ const enum MessageAttributes::IPVersionType ipversion =
+ (i & 1) != 0 ?
MessageAttributes::IP_VERSION_IPV4 :
MessageAttributes::IP_VERSION_IPV6;
- const enum MessageAttributes::TransportProtocol proto = (i & 2) != 0 ?
+ const enum MessageAttributes::TransportProtocolType proto =
+ (i & 2) != 0 ?
MessageAttributes::TRANSPORT_UDP :
MessageAttributes::TRANSPORT_TCP;
buildSkeletonMessage(msgattrs);
- msgattrs.setRequestIPVersion(af);
+ msgattrs.setRequestIPVersion(ipversion);
msgattrs.setRequestTransportProtocol(proto);
response.setRcode(Rcode::REFUSED());
@@ -193,7 +202,7 @@ TEST_F(CountersTest, incrementProtocolType) {
counters.inc(msgattrs, response, true);
- if (af == MessageAttributes::IP_VERSION_IPV4) {
+ if (ipversion == MessageAttributes::IP_VERSION_IPV4) {
++count_v4;
} else {
++count_v6;
diff --git a/tests/lettuce/features/queries.feature b/tests/lettuce/features/queries.feature
index eecf1f9..83e77df 100644
--- a/tests/lettuce/features/queries.feature
+++ b/tests/lettuce/features/queries.feature
@@ -18,12 +18,11 @@ 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
+ When I 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 counters are 0 in category .Auth.zones
+ 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_
A query for www.example.org should have rcode NOERROR
The last query response should have flags qr aa rd
@@ -46,20 +45,19 @@ Feature: Querying feature
ns2.example.org. 3600 IN A 192.0.2.4
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 1 |
+ | request.udp | 1 |
+ | opcode.query | 1 |
+ | responses | 1 |
+ | qrysuccess | 1 |
+ | qryauthans | 1 |
+ | rcode.noerror | 1 |
# Repeat of the above
@@ -84,20 +82,19 @@ Feature: Querying feature
ns2.example.org. 3600 IN A 192.0.2.4
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 2 |
+ | request.udp | 2 |
+ | opcode.query | 2 |
+ | responses | 2 |
+ | qrysuccess | 2 |
+ | qryauthans | 2 |
+ | rcode.noerror | 2 |
# And now query something completely different
A query for nosuchname.example.org should have rcode NXDOMAIN
@@ -110,21 +107,20 @@ Feature: Querying feature
example.org. 3600 IN SOA ns1.example.org. admin.example.org. 1234 3600 1800 2419200 7200
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 3 |
+ | request.udp | 3 |
+ | opcode.query | 3 |
+ | responses | 3 |
+ | qrysuccess | 2 |
+ | qryauthans | 3 |
+ | rcode.noerror | 2 |
+ | rcode.nxdomain | 1 |
Scenario: ANY query
Given I have bind10 running with configuration example.org.inmem.config
@@ -140,12 +136,11 @@ 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
+ When I 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 counters are 0 in category .Auth.zones
+ 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_
A query for example.org type ANY should have rcode NOERROR
The last query response should have flags qr aa rd
@@ -166,20 +161,19 @@ Feature: Querying feature
mail.example.org. 3600 IN A 192.0.2.10
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 1 |
+ | request.udp | 1 |
+ | opcode.query | 1 |
+ | responses | 1 |
+ | qrysuccess | 1 |
+ | qryauthans | 1 |
+ | rcode.noerror | 1 |
Scenario: Delegation query for unsigned child zone
Given I have bind10 running with configuration example.org.inmem.config
@@ -187,12 +181,11 @@ 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
+ When I 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 counters are 0 in category .Auth.zones
+ 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_
A dnssec query for www.sub.example.org type AAAA should have rcode NOERROR
The last query response should have flags qr rd
@@ -209,23 +202,22 @@ Feature: Querying feature
ns.sub.example.org. 3600 IN A 192.0.2.101
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 1 |
+ | request.udp | 1 |
+ | request.edns0 | 1 |
+ | request.dnssec_ok | 1 |
+ | opcode.query | 1 |
+ | responses | 1 |
+ | response.edns0 | 1 |
+ | qrynoauthans | 1 |
+ | qryreferral | 1 |
+ | rcode.noerror | 1 |
Scenario: SSHFP query
# We are testing one more RR type for a normal successful case
@@ -242,30 +234,28 @@ 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
+ When I 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 counters are 0 in category .Auth.zones
+ 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_
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
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 1 |
+ | request.udp | 1 |
+ | opcode.query | 1 |
+ | responses | 1 |
+ | qryauthans | 1 |
+ | qrynxrrset | 1 |
+ | rcode.noerror | 1 |
A query for shell.example.org type SSHFP should have rcode NOERROR
The last query response should have ancount 1
@@ -274,18 +264,17 @@ Feature: Querying feature
shell.example.org. 3600 IN SSHFP 2 1 123456789abcdef67890123456789abcdef67890
"""
- And wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
+ When I 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 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 |
+ 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
+ | item_name | item_value |
+ | request.v4 | 2 |
+ | request.udp | 2 |
+ | opcode.query | 2 |
+ | responses | 2 |
+ | qrysuccess | 1 |
+ | qryauthans | 2 |
+ | qrynxrrset | 1 |
+ | rcode.noerror | 2 |
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 2bbf30e..50b165d 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -441,7 +441,7 @@ def check_statistics(step, counter, category, zone, gtltbt, number, upper):
else:
assert int(found) == int(number), msg
- at step('the statistics counters are 0 in category (\S+)( except for the' + \
+ at step('statistics counters are 0 in category (\S+)( except for the' + \
' following items)?')
def check_statistics_items(step, category, has_except_for):
"""
More information about the bind10-changes
mailing list