BIND 10 #3113: Hooks unit-tests fail when --enable-static-link is used
BIND 10 Development
do-not-reply at isc.org
Fri Aug 30 12:58:57 UTC 2013
#3113: Hooks unit-tests fail when --enable-static-link is used
-------------------------------------+-------------------------------------
Reporter: tomek | Owner:
Type: defect | Status: new
Priority: medium | Milestone: DHCP
Component: dhcp | Outstanding Tasks
Keywords: | Resolution:
Sensitive: 0 | CVSS Scoring:
Sub-Project: DHCP | Defect Severity: N/A
Estimated Difficulty: 0 | Feature Depending on Ticket:
Total Hours: 0 | Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by marcin):
The !LoadLibraries test loads the full_callout_library.cc sucessfuly. The
load function exposed by this library registers the two other callouts by
calling the:
{{{
handle.registerCallout("hookpt_two", hook_nonstandard_two);
handle.registerCallout("hookpt_three", hook_nonstandard_three);
}}}
The first call eventually leads to the invocation of
CalloutManager::registerCallout function.
The first sign of the error shows up on the beginning of this function
where logger prints an odd error:
{{{
2013-08-30 11:05:51.351 DEBUG [bind10.hooks/31496]
HOOKS_CALLOUT_REGISTRATION @@Missing placeholder %1 for '1'@@ @@Missing
placeholder %2 for 'hookpt_two'@@
}}}
which suggests that the logger state gets reset when dynamically loaded
library calls back the b10-hooks library.
Similar symptom is a couple of lines down this function:
{{{
int hook_index = ServerHooks::getServerHooks().getIndex(name);
}}}
The call to ServerHooks::getServerHooks() returns the instance of the
singleton, which seems to be !''new instance!'' (other than the one
created by the unit test program) and it lacks the hooks which have been
registered by the unit test program in
lib/hooks/tests/common_test_class.h. As a consequence, the registered
hooks are not found in this new instance of !ServerHooks object and the
test falls over.
--
Ticket URL: <http://bind10.isc.org/ticket/3113#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list