BIND 10 trac2934, updated. e488b9b74d562517bf430b1de30747d575966b07 [2934] updated docstring for make_blocking, clarifying file vs socket
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri May 17 16:22:07 UTC 2013
The branch, trac2934 has been updated
via e488b9b74d562517bf430b1de30747d575966b07 (commit)
via 72e89527efb75c3aaec0843bf81b08581c3b1f58 (commit)
via b9b2b5e9a5aba9c87939ff116d103c8e9d42c550 (commit)
via 1519438c8f9c74286b84c7258ea9ede4a5a03a7d (commit)
from 2ab76e6181396639a60994b5c78493fa2235b304 (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 e488b9b74d562517bf430b1de30747d575966b07
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 17 09:21:44 2013 -0700
[2934] updated docstring for make_blocking, clarifying file vs socket
commit 72e89527efb75c3aaec0843bf81b08581c3b1f58
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 17 09:19:07 2013 -0700
[2934] corrected a typo
commit b9b2b5e9a5aba9c87939ff116d103c8e9d42c550
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 17 09:18:15 2013 -0700
[2934] updated lettuce README regarding prerequisites programs to be installed.
commit 1519438c8f9c74286b84c7258ea9ede4a5a03a7d
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 17 09:04:21 2013 -0700
[2934] explained the rationale of the imposed delay for a xfrout test.
-----------------------------------------------------------------------
Summary of changes:
src/bin/xfrout/tests/xfrout_test.py.in | 2 +-
src/bin/xfrout/xfrout.py.in | 13 ++++++++-----
tests/lettuce/README | 7 +++++--
tests/lettuce/features/terrain/transfer.py | 2 +-
tests/lettuce/features/xfrout_bind10.feature | 5 +++++
5 files changed, 20 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/xfrout/tests/xfrout_test.py.in b/src/bin/xfrout/tests/xfrout_test.py.in
index c2157de..5141844 100644
--- a/src/bin/xfrout/tests/xfrout_test.py.in
+++ b/src/bin/xfrout/tests/xfrout_test.py.in
@@ -290,7 +290,7 @@ class TestXfroutSessionBase(unittest.TestCase):
def setUp(self):
# xfrout.make_blocking won't work with faked socket, and we'd like to
- # examine how it's called, so we replace it without our mock.
+ # examine how it's called, so we replace it with our mock.
self.__orig_make_blocking = xfrout.make_blocking
self._make_blocking_history = []
xfrout.make_blocking = lambda x, y: self.__make_blocking(x, y)
diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in
index 38e4a33..0055bb1 100755
--- a/src/bin/xfrout/xfrout.py.in
+++ b/src/bin/xfrout/xfrout.py.in
@@ -154,13 +154,16 @@ def get_soa_serial(soa_rdata):
return Serial(int(soa_rdata.to_text().split()[2]))
def make_blocking(filenum, on):
- """A helper function to change blocking mode of the given file.
+ """A helper function to change blocking mode of the given socket.
- It sets the mode of blocking I/O for the file associated with filenum,
- according to parameter 'on': if it's True the file will be made blocking;
- otherwise it will be made non-blocking.
+ It sets the mode of blocking I/O for the socket associated with filenum
+ (descriptor of the socket) according to parameter 'on': if it's True the
+ file will be made blocking; otherwise it will be made non-blocking.
- filenum(int): file number (descriptor) of the file to update.
+ The given filenum must be a descriptor of a socket (not an ordinary file
+ etc), but this function doesn't check that condition.
+
+ filenum(int): file number (descriptor) of the socket to update.
on(bool): whether enable (True) or disable (False) blocking I/O.
"""
diff --git a/tests/lettuce/README b/tests/lettuce/README
index a53c6e7..48c4043 100644
--- a/tests/lettuce/README
+++ b/tests/lettuce/README
@@ -6,7 +6,8 @@ these tests are specific for BIND10, but we are keeping in mind that RFC-related
tests could be separated, so that we can test other systems as well.
Prerequisites:
-- BIND 10 must be compiled or installed
+- BIND 10 must be compiled or installed (even when testing in-tree build;
+ see below)
- dig
- lettuce (http://lettuce.it)
@@ -32,7 +33,9 @@ By default it will use the build tree, but you can use an installed version
of bind10 by passing -I as the first argument of run_lettuce.sh
The tool 'dig' must be in the default search path of your environment. If
-you specified -I, so must the main bind10 program, as well as bindctl.
+you specified -I, so must the main BIND 10 programs. And, with or without
+-I, some BIND 10 programs still have to be installed as they are invoked
+from test tools. Those include bindctl and b10-loadzone.
Due to the default way lettuce prints its output, it is advisable to run it
in a terminal that is wide than the default. If you see a lot of lines twice
diff --git a/tests/lettuce/features/terrain/transfer.py b/tests/lettuce/features/terrain/transfer.py
index b5a0dfe..0983de5 100644
--- a/tests/lettuce/features/terrain/transfer.py
+++ b/tests/lettuce/features/terrain/transfer.py
@@ -84,7 +84,7 @@ def perform_axfr(step, zone_name, address, port):
args = [ 'dig', 'AXFR', '@' + str(address), '-p', str(port), zone_name ]
world.transfer_result = TransferResult(args)
- at step('A customized AXFR transfer of ([\w.]+)(?: from ([\d.]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))?)?(?: with pose of (\d+) second)?')
+ at step('A customized AXFR transfer of ([\w.]+)(?: from ([\d.]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))?)?(?: with pose of (\d+) seconds?)?')
def perform_custom_axfr(step, zone_name, address, port, delay):
"""Checks AXFR transfer, and store the result in the form of internal
CustomTransferResult class, which is compatible with TransferResult.
diff --git a/tests/lettuce/features/xfrout_bind10.feature b/tests/lettuce/features/xfrout_bind10.feature
index 0580b01..7f4e4de 100644
--- a/tests/lettuce/features/xfrout_bind10.feature
+++ b/tests/lettuce/features/xfrout_bind10.feature
@@ -19,6 +19,11 @@ Feature: Xfrout
# Similar to the previous one, but using a much larger zone, and with
# a small delay at the client side. It should still succeed.
+ # The specific delay (5 seconds) was chosen for an environment that
+ # revealed a bug which is now fixed to reproduce the issue; shorter delays
+ # didn't trigger the problem. Depending on the OS implementation, machine
+ # speed, etc, the same delay may be too long or too short, but in any case
+ # the test should succeed now.
Scenario: transfer a large zone
Load 50000 records for zone example.org to DB file data/xfrout.sqlite3
More information about the bind10-changes
mailing list