BIND 10 trac1175, updated. 1fd3b23ae4734b74f4d32ce641e48cce30cc4cb7 [1175] - more strictly close the io object whether it's successfully opened or not - add verbosity=2 in unittest.main for debugging the failure in the buildbot - don't redict sys.stderr in MockMsgq - rename the function name to create_specfile - switch the verbose in Msgq into True
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Sep 1 04:21:55 UTC 2011
The branch, trac1175 has been updated
discards 07c1b5ec226758101a9ec540df7f3ef0c9f6ab6d (commit)
discards 17e8027e14920b76366117cdb90f6d6eccd17eb3 (commit)
discards 5ed59a00c0e4f5f0f8e964612f5af281f419bbac (commit)
discards 9761b4df2e6c746e93f7220ae52e4e6c124cb576 (commit)
discards 64f41ca526ad5858604815980ec1a8bb6e770ee6 (commit)
discards 3d5e8a58b5379118787b736172bb005f525d5d0c (commit)
discards 496714b338e777d373542ada473303f03dfaf163 (commit)
discards 77f3ef9ea62ce35288af257b9204b19ef7840c7e (commit)
discards 156adf368e66dccc0929a71bf565ea4bc06c94ad (commit)
discards 5dac7a791f02498f3971c95f46747488d08e8999 (commit)
discards bc12dc101aa75269ed1308278792f7c35fcf794a (commit)
via 1fd3b23ae4734b74f4d32ce641e48cce30cc4cb7 (commit)
via 4555a37ab2f6e65094d71f7d744f482b034666f0 (commit)
via d6c108d77b4e8ee492839cac4e6b5bc1c97da01d (commit)
via fe89018fedffe750b46647baa25ded6be102a6c7 (commit)
via 28ab40e038e2d64a4190f03355845835251be8bf (commit)
via 61dc4b1c5853e1bde814eec1e414be0259322e80 (commit)
via 8f2b875c605c4975a5edf3ce5bed5b1cff351649 (commit)
via 4a399840f7b24aedbd5fab74b5136d61f598bf43 (commit)
via a1fb73b6c54059c6247b036b6a7f8f1b7b008f2d (commit)
via 866ad553d4c7ee501cc2ae4db831c814edbc2ba0 (commit)
via 558e24b384ba95f3f1bdb7345eb5d7431a747a85 (commit)
via bd1b2c3e4eca04bfac9541b35d7aabcf184c79c2 (commit)
via 75e756cdf9d5b08e859afac5cef38bd818a90e60 (commit)
via 778bd1be6ced7f4a135e2a6bcc7414c4e4bdc27d (commit)
via ecf3f4b962026aa9094ee321b03ee32df2fdf1d2 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (07c1b5ec226758101a9ec540df7f3ef0c9f6ab6d)
\
N -- N -- N (1fd3b23ae4734b74f4d32ce641e48cce30cc4cb7)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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 1fd3b23ae4734b74f4d32ce641e48cce30cc4cb7
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Thu Sep 1 04:19:53 2011 +0000
[1175]
- more strictly close the io object whether it's successfully opened or not
- add verbosity=2 in unittest.main for debugging the failure in the buildbot
- don't redict sys.stderr in MockMsgq
- rename the function name to create_specfile
- switch the verbose in Msgq into True
commit 4555a37ab2f6e65094d71f7d744f482b034666f0
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Fri Aug 26 12:01:47 2011 +0900
[1175] fix wrong list-type handling in the function get_spec_defaults and add
more tests into test_get_spec_defaults
commit d6c108d77b4e8ee492839cac4e6b5bc1c97da01d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Aug 24 17:28:29 2011 +0900
[1175] fix typo and correct changes from trac519
commit fe89018fedffe750b46647baa25ded6be102a6c7
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Aug 24 16:51:11 2011 +0900
[1175] deadlock will be killed afer 20 secs
commit 28ab40e038e2d64a4190f03355845835251be8bf
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Aug 24 15:55:21 2011 +0900
[1175] fix conflicts with trac519
commit 61dc4b1c5853e1bde814eec1e414be0259322e80
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 23 16:42:18 2011 +0900
[1175]
- A hostname (canonical name of host) is not acceptable in listen_on
configuration.
- A default port number(starting number for search) is added in args of the
function get_availaddr.
commit 8f2b875c605c4975a5edf3ce5bed5b1cff351649
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Tue Aug 23 11:22:03 2011 +0900
[1175] set msgq verbose off
commit 4a399840f7b24aedbd5fab74b5136d61f598bf43
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 22 18:20:39 2011 +0900
[1175] add #1175
commit a1fb73b6c54059c6247b036b6a7f8f1b7b008f2d
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 22 18:18:47 2011 +0900
[1175]
- don't use time.sleep for waiting threads are starting or finishing
- correct shutting down of mock modules
- use _started (threading.Event) where command_handler is invoked
- add implementation to changing contents of specfile of MyStatsHttpd
- set "BIND10_MSGQ_SOCKET_FILE" only when it's not set yet
commit 866ad553d4c7ee501cc2ae4db831c814edbc2ba0
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 22 18:10:25 2011 +0900
[1175]
- add function get_availaddr to get available address and port on the platform
- add function is_ipv6enabled to check ipv6 enabled on the platform
- add miscellaneous changes to refactor unittest
commit 558e24b384ba95f3f1bdb7345eb5d7431a747a85
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Mon Aug 22 18:05:57 2011 +0900
[1175]
- don't use DEFAULT_CONFIG
- move up mccs.start and open_httpd to __init__(). It takes time to do these
functions, and an extra sleep is needed in unittests.
- set running to False in http stopping
- use validate_config in module_spec class
- don't close/open http before it's opened
commit bd1b2c3e4eca04bfac9541b35d7aabcf184c79c2
Author: Naoki Kambe <kambe at jprs.co.jp>
Date: Wed Aug 17 13:37:45 2011 +0900
Revert "[master] Revert trac930 because of failures on biuldbots:"
This reverts commit 5de7909a21a077238567b64e489ed5345824b2a0.
Conflicts:
ChangeLog
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 6 +++
src/bin/stats/tests/b10-stats-httpd_test.py | 35 +++++++++++--------
src/bin/stats/tests/b10-stats_test.py | 2 +-
src/bin/stats/tests/test_utils.py | 33 ++++++++++--------
src/lib/datasrc/tests/sqlite3_accessor_unittest.cc | 13 ++++++--
5 files changed, 55 insertions(+), 34 deletions(-)
-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index bbf1d80..d625915 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,6 +12,12 @@ AC_PROG_CXX
# Libtool configuration
#
+
+# libtool cannot handle spaces in paths, so exit early if there is one
+if [ test `echo $PWD | grep -c ' '` != "0" ]; then
+ AC_MSG_ERROR([BIND 10 cannot be built in a directory that contains spaces, because of libtool limitations. Please change the directory name, or use a symbolic link that does not contain spaces.])
+fi
+
# On FreeBSD (and probably some others), clang++ does not meet an autoconf
# assumption in identifying libtool configuration regarding shared library:
# the configure script will execute "$CC -shared $CFLAGS/$CXXFLAGS -v" and
diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py
index bf4c33f..f243ef4 100644
--- a/src/bin/stats/tests/b10-stats-httpd_test.py
+++ b/src/bin/stats/tests/b10-stats-httpd_test.py
@@ -63,29 +63,34 @@ def get_availaddr(address='127.0.0.1', port=8001):
"""returns tuple of address and port available to listen on the
platform. Default port range is between 8001 and 65535. If port is
over flow(greater than 65535), OverflowError is thrown"""
- while True:
- try:
- if is_ipv6_enabled(address):
- sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
- else :
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.bind((address, port))
- sock.close()
- return (address, port)
- except socket.error:
- # This address and port number are already in use.
- # next port number is added
- port = port + 1
+ sock = None
+ if is_ipv6_enabled(address):
+ sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
+ else:
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ try:
+ while True:
+ try:
+ sock.bind((address, port))
+ return (address, port)
+ except socket.error:
+ # This address and port number are already in use.
+ # next port number is added
+ port = port + 1
+ finally:
+ if sock: sock.close()
def is_ipv6_enabled(address='::1', port=8000):
"""checks IPv6 enabled on the platform"""
+ sock = None
try:
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.bind((address, port))
- sock.close()
return True
except socket.error:
return False
+ finally:
+ if sock: sock.close()
class TestHttpHandler(unittest.TestCase):
"""Tests for HttpHandler class"""
@@ -698,4 +703,4 @@ class TestStatsHttpd(unittest.TestCase):
imp.reload(stats_httpd)
if __name__ == "__main__":
- unittest.main()
+ unittest.main(verbosity=2)
diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py
index 892032d..919dc43 100644
--- a/src/bin/stats/tests/b10-stats_test.py
+++ b/src/bin/stats/tests/b10-stats_test.py
@@ -603,7 +603,7 @@ class TestOSEnv(unittest.TestCase):
imp.reload(stats)
def test_main():
- unittest.main()
+ unittest.main(verbosity=2)
if __name__ == "__main__":
test_main()
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index 747b749..ff45440 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -60,7 +60,7 @@ class ThreadingServerManager:
class MockMsgq:
def __init__(self):
self._started = threading.Event()
- self.msgq = msgq.MsgQ(verbose=False)
+ self.msgq = msgq.MsgQ(verbose=True)
result = self.msgq.setup()
if result:
sys.exit("Error on Msgq startup: %s" % result)
@@ -68,10 +68,7 @@ class MockMsgq:
def run(self):
self._started.set()
try:
- # any message is written to /dev/null
- sys.stderr = open(os.devnull, "w")
self.msgq.run()
- sys.stderr.close()
except Exception:
pass
finally:
@@ -254,24 +251,30 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
def __init__(self, *server_address):
self._started = threading.Event()
if server_address:
- stats_httpd.SPECFILE_LOCATION = self.get_specfile(*server_address)
+ stats_httpd.SPECFILE_LOCATION = self.create_specfile(*server_address)
try:
stats_httpd.StatsHttpd.__init__(self)
finally:
- stats_httpd.SPECFILE_LOCATION.close()
+ if hasattr(stats_httpd.SPECFILE_LOCATION, "close"):
+ stats_httpd.SPECFILE_LOCATION.close()
stats_httpd.SPECFILE_LOCATION = self.ORIG_SPECFILE_LOCATION
else:
stats_httpd.StatsHttpd.__init__(self)
- def get_specfile(self, *server_address):
- spec = json.load(open(self.ORIG_SPECFILE_LOCATION))
- config = spec['module_spec']['config_data']
- for i in range(len(config)):
- if config[i]['item_name'] == 'listen_on':
- config[i]['item_default'] = \
- [ dict(address=a[0], port=a[1]) for a in server_address ]
- break
- return io.StringIO(json.dumps(spec))
+ def create_specfile(self, *server_address):
+ spec_io = open(self.ORIG_SPECFILE_LOCATION)
+ try:
+ spec = json.load(spec_io)
+ spec_io.close()
+ config = spec['module_spec']['config_data']
+ for i in range(len(config)):
+ if config[i]['item_name'] == 'listen_on':
+ config[i]['item_default'] = \
+ [ dict(address=a[0], port=a[1]) for a in server_address ]
+ break
+ return io.StringIO(json.dumps(spec))
+ finally:
+ spec_io.close()
def run(self):
self._started.set()
diff --git a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
index 427ee71..022f68e 100644
--- a/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
+++ b/src/lib/datasrc/tests/sqlite3_accessor_unittest.cc
@@ -431,9 +431,16 @@ class SQLite3Update : public SQLite3AccessorTest {
protected:
SQLite3Update() {
// Note: if "installing" the test file fails some of the subsequent
- // tests will fail and we should be able to notice that.
- system(INSTALL_PROG " " TEST_DATA_DIR
- "/test.sqlite3 " TEST_DATA_BUILDDIR "/test.sqlite3.copied");
+ // tests would fail.
+ const char *install_cmd = INSTALL_PROG " " TEST_DATA_DIR
+ "/test.sqlite3 " TEST_DATA_BUILDDIR
+ "/test.sqlite3.copied";
+ if (system(install_cmd) != 0) {
+ // any exception will do, this is failure in test setup, but nice
+ // to show the command that fails, and shouldn't be caught
+ isc_throw(isc::Exception,
+ "Error setting up; command failed: " << install_cmd);
+ };
initAccessor(TEST_DATA_BUILDDIR "/test.sqlite3.copied", RRClass::IN());
zone_id = accessor->getZone("example.com.").second;
another_accessor.reset(new SQLite3Accessor(
More information about the bind10-changes
mailing list