BIND 10 master, updated. e561cb2ebdabe6a41ee3e702f407c853a88857ff [master] Merge branch 'trac2823-regression'

BIND 10 source code commits bind10-changes at lists.isc.org
Wed May 15 15:55:52 UTC 2013


The branch, master has been updated
       via  e561cb2ebdabe6a41ee3e702f407c853a88857ff (commit)
       via  e67c6142d40cfde0a9c04c0ae491b8f8754bf69d (commit)
       via  2a1a86b1b753b7fdc7db4bc48e8f0838a9521187 (commit)
       via  f1dd9da6c3582b6dcb876609a142f9b6c80389e1 (commit)
       via  d5d0d09842cd041653044e90bb6f2db0525c3f33 (commit)
       via  5fcf58d12137139ba41af390550a0b73ea8a9ef3 (commit)
      from  066c983e091831645218810fb921986a659ccb1b (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 e561cb2ebdabe6a41ee3e702f407c853a88857ff
Merge: 066c983 e67c614
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed May 15 08:53:49 2013 -0700

    [master] Merge branch 'trac2823-regression'

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

Summary of changes:
 src/bin/stats/tests/stats-httpd_test.py |    1 +
 src/bin/stats/tests/stats_test.py       |   13 +++++++++++--
 src/bin/stats/tests/test_utils.py       |   11 +++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/tests/stats-httpd_test.py b/src/bin/stats/tests/stats-httpd_test.py
index a61ee47..a37302d 100644
--- a/src/bin/stats/tests/stats-httpd_test.py
+++ b/src/bin/stats/tests/stats-httpd_test.py
@@ -248,6 +248,7 @@ class TestHttpHandler(unittest.TestCase):
 
     def tearDown(self):
         self.client.close()
+        self.stats_httpd_server.shutdown()
         # reset the signal handler
         self.sig_handler.reset()
 
diff --git a/src/bin/stats/tests/stats_test.py b/src/bin/stats/tests/stats_test.py
index e010c97..dd1b79b 100644
--- a/src/bin/stats/tests/stats_test.py
+++ b/src/bin/stats/tests/stats_test.py
@@ -1285,6 +1285,15 @@ class TestStats(unittest.TestCase):
         """check statistics data of 'Init'."""
 
         stat = MyStats()
+        # At this point 'stat' is initialized with statistics for Stats,
+        # Init and Auth modules.  In this test, we only need to check for Init
+        # statistics, while do_polling() can ask for module statistics in an
+        # unpredictable order (if hash randomization is enabled, which is
+        # the case by default for Python 3.3).  To make it predictable and
+        # ensure the prepared answer doesn't cause disruption, we remove the
+        # information for the Auth module for this test.
+        del stat.statistics_data['Auth']
+
         stat.update_modules = lambda: None
         create_answer = isc.config.ccsession.create_answer # shortcut
 
@@ -1403,8 +1412,8 @@ class TestStats(unittest.TestCase):
 
 class Z_TestOSEnv(unittest.TestCase):
     # Running this test would break logging setting.  To prevent it from
-    # affecting other tests we use the same workaround as
-    # Z_TestStatsHttpdError.
+    # affecting other tests we use the same workaround as Z_TestOSEnv in
+    # stats-httpd_test.py.
     def test_osenv(self):
         """
         test for the environ variable "B10_FROM_SOURCE"
diff --git a/src/bin/stats/tests/test_utils.py b/src/bin/stats/tests/test_utils.py
index 8886ad2..7456511 100644
--- a/src/bin/stats/tests/test_utils.py
+++ b/src/bin/stats/tests/test_utils.py
@@ -514,6 +514,14 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
         self.cc_session = self.mccs._session
         self.mccs.start = self.load_config # force reload
 
+        # check_command could be called from the main select() loop due to
+        # Linux's bug of spurious wakeup.  We don't need the actual behavior
+        # of check_command in our tests, so we can basically replace it with a
+        # no-op mock function.
+        def mock_check_command(nonblock):
+            pass
+        self.mccs.check_command = mock_check_command
+
     def close_mccs(self):
         super().close_mccs()
         if self.__dummy_sock is not None:
@@ -562,3 +570,6 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
     def run(self):
         self._started.set()
         self.start()
+
+    def shutdown(self):
+        self.command_handler('shutdown', None)



More information about the bind10-changes mailing list