BIND 10 trac2853, updated. c5352f69e7fe7b9071066b4ce40d47c2d7948a1f [2853] Add another unittest (that crashes currently)
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 6 22:47:02 UTC 2013
The branch, trac2853 has been updated
via c5352f69e7fe7b9071066b4ce40d47c2d7948a1f (commit)
via 71eec22b3e41413651107079d9f9b5cf34d2c7ca (commit)
from 9b1ceb841266b4df04ac717186c86b22f77fe314 (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 c5352f69e7fe7b9071066b4ce40d47c2d7948a1f
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 7 04:15:52 2013 +0530
[2853] Add another unittest (that crashes currently)
commit 71eec22b3e41413651107079d9f9b5cf34d2c7ca
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Jun 7 04:15:21 2013 +0530
[2853] Acquire a ref on the ConfigurableClientList object when creating a ZoneWriter
This is so that the client list is kept alive as long as the ZoneWriter is.
-----------------------------------------------------------------------
Summary of changes:
.../isc/datasrc/configurableclientlist_python.cc | 2 +-
.../python/isc/datasrc/tests/clientlist_test.py | 23 ++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/datasrc/configurableclientlist_python.cc b/src/lib/python/isc/datasrc/configurableclientlist_python.cc
index 712b280..36b6cf9 100644
--- a/src/lib/python/isc/datasrc/configurableclientlist_python.cc
+++ b/src/lib/python/isc/datasrc/configurableclientlist_python.cc
@@ -178,7 +178,7 @@ ConfigurableClientList_getCachedZoneWriter(PyObject* po_self, PyObject* args) {
} else {
// Make sure it keeps the writer alive.
writer.reset(createZoneWriterObject(result.second,
- NULL));
+ po_self));
}
return (Py_BuildValue("IO", result.first, writer.get()));
diff --git a/src/lib/python/isc/datasrc/tests/clientlist_test.py b/src/lib/python/isc/datasrc/tests/clientlist_test.py
index ce9b351..e948a89 100644
--- a/src/lib/python/isc/datasrc/tests/clientlist_test.py
+++ b/src/lib/python/isc/datasrc/tests/clientlist_test.py
@@ -194,6 +194,29 @@ class ClientListTest(unittest.TestCase):
# The segment is still in READ_ONLY mode.
self.find_helper()
+ def test_find_mapped2(self):
+ """
+ Test find on a mapped segment.
+ """
+ self.clist = isc.datasrc.ConfigurableClientList(isc.dns.RRClass.IN)
+ self.clist.configure('''[{
+ "type": "MasterFiles",
+ "params": {
+ "example.org": "''' + TESTDATA_PATH + '''no-example.org.zone"
+ },
+ "cache-enable": true,
+ "cache-type": "mapped"
+ }]''', True)
+
+ map_params = '{"mapped-file": "' + MAPFILE_PATH + '"}'
+ self.clist.reset_memory_segment("MasterFiles",
+ isc.datasrc.ConfigurableClientList.CREATE,
+ map_params)
+ result = self.clist.get_cached_zone_writer(isc.dns.Name("example.org"))
+ self.assertEqual(isc.datasrc.ConfigurableClientList.CACHE_STATUS_ZONE_SUCCESS,
+ result[0])
+ result[1].load()
+
if __name__ == "__main__":
isc.log.init("bind10")
isc.log.resetUnitTestRootLogger()
More information about the bind10-changes
mailing list