[tor-dev] Unit tests that need writing in core
nickm at freehaven.net
Mon Jun 2 02:48:53 UTC 2014
On Sat, May 31, 2014 at 9:15 AM, Ajay Bhat <a.ajay.bhat at gmail.com> wrote:
> I'd like to contribute to tor core by writing any unit tests that need to be
> done. Can anyone please help me out by pointing out the code/modules that
> needs to be tested?
Hi, Ajay! I've been meaning to write an all-purpose "how to test Tor"
document, but until I can get that done, here's how I find out what to
test. I take the latest version of the git master branch, and I
configure it with the --enable-coverage option. Then I run "make
check" , and "mkdir tmpdir" and "./scripts/test/coverage tmpdir".
That creates a bunch of .gcov files in the temporary directory
"tmpdir", which shows which lines have coverage. (All the lines
beginning with ### are lines that were not visited by the unit tests.)
In other words:
./configure --enable-gcc-warnings --enable-coverage
I've run this on today's master branch, and put the results in
(This URL is temporary.)
I've also attached a list of the modules in Tor, sorted by the
fractions of lines covered by tests today. The numbers after each
line are the number of uncovered lines, the number of covered lines,
and total percentage of covered lines.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3715 bytes
Desc: not available
More information about the tor-dev