BIND 10 #2379: add python wrapper of datasrc::ZoneLoader

BIND 10 Development do-not-reply at isc.org
Mon Dec 17 16:33:11 UTC 2012


#2379: add python wrapper of datasrc::ZoneLoader
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  jinmei
            Priority:  medium        |                       Status:
           Component:  data source   |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20121218
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  10            |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:12 jelte]:

 > > > Also added a check that should trigger too many DECREFS. But have
 not really thought of a good way to test reference leaks.
 > > >
 > > > Not sure what that last line means.
 > >
 > > Ah there was a typo, I meant "writing a test", and specifically
 > > intended checking the object's refcount directly using
 > > sys.getrefcount() like in message_python_test.py:test_get_section()
 > > (for `isc.dns.Message`).
 >
 > ah, ok :) In that sense we should check it for every possible scenario
 (and hence for all tests, and hence best in setUp() and tearDown().
 Removed the separate checkrefs tests again and added refcount checks to
 those (putting an optional source_client in self to check those as well).

 By "removed", do you mean adding 'X' to
 test_load_from_file_checkrefs() and test_load_from_client_checkrefs()?
 If the intent is to remove them, why not just literally do so?

 Also, for dns++ python wrapper, I noticed we should handle error cases
 of addClassVariable() correctly, too, e.g., here:
 {{{#!cpp
 bool
 initModulePart_EDNS(PyObject* mod) {
     // After the type has been initialized, we initialize any exceptions
     // that are defined in the wrapper for this class, and add constants
     // to the type, if any

     if (!initClass(edns_type, "EDNS", mod)) {
         return (false);
     }
     addClassVariable(edns_type, "SUPPORTED_VERSION",
                      Py_BuildValue("B", EDNS::SUPPORTED_VERSION));

     return (true);
 }
 }}}
 but that should go to a separate task.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2379#comment:13>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list