[PATCH] ldb_debug: Fix for bug 13185

Andrew Bartlett abartlet at samba.org
Thu Feb 22 07:30:41 UTC 2018

On Thu, 2018-02-22 at 08:22 +0100, Andreas Schneider via samba-
technical wrote:
> Add a unit test for this patch?

G'Day Gary,

One approach would be to call ldb_set_debug() with a local function
(rather than printing to stderr) which would watch for the right debug
messages being printed (or not printed as the case may be).

If the right one is 'printed' via the callback, set something on the
context, check for it after the call. 

There are probably even more fancy mocking ways of doing it, but this
much is fairly practical without too much extension.

Andrew Bartlett
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba-technical mailing list