[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] Unit tests that need writing in core



On Sat, May 31, 2014 at 9:15 AM, Ajay Bhat <a.ajay.bhat@xxxxxxxxx> wrote:
> Hi,
>
> 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
  make
  make check
  mkdir tmpdir
  ./scripts/test/coverage tmpdir

I've run this on today's master branch, and put the results in
  http://www.wangafu.net/~nickm/volatile/tor-coverage-be90580.tar.bz2
(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.

Attachment: cov-by-module-be90580
Description: Binary data

_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev