[ntp-GSoC] Unit testing, weekly report #9

Linus Karlsson karlsson at ntp.org
Fri Aug 12 22:14:38 UTC 2011


Hi,

This is a report covering the two latest weeks of my GSoC work.

There have been some trouble with the mocking of DNS-queries on Windows,
since the Visual Studio headers contains definitions of the functions
(not just declarations as on other systems I've tested on). Since I
didn't come up with a good solution I have disabled these tests on
Windows.

I also felt that I needed a break from the mocking tests, so I have
started to look at the parts of libisc that's used by various parts
of NTP. I used ctags to get a list of all functions in libisc, and
cflow to get a tree of all functions called by the rest of NTP.
Then I wrote a small program to find the intersection of these two
sets of functions, with a resulting list of libisc functions actually
used. The list is at the following address:

  http://pastebin.com/QMGFFqcq

I have started with the isc_netaddr_* and isc_assertion_* functions,
isc_error_setfatal() and isc_error_setunexpected() should be
straightforward when I've got the assertion tests to work.

The most tricky part is probably the interface iteration code, since
there are several different implementations of the same functions,
depending on the system it is compiled on. I hope it will be
possible to use my mocking framework for this this too.

Regards,
Linus



More information about the GSoC mailing list