[ccan] iniparser almost done, a couple of questions before uploading
Tim Post
echo at echoreply.us
Fri Apr 3 16:07:00 EST 2009
Hi Rusty,
On Thu, 2009-04-02 at 22:29 +1030, Rusty Russell wrote:
> I wasn't planning on explicitly setting requirements. The GSoC student(s)
> will integrate coverage testing into ccanlint so it'll be up to people reading
> the ccanlint scores to decide whether your coverage is high enough I guess.
Well, I now have it valgrind clean, the test will run under valgrind
without a problem. Its easy to add more tests if the coverage is
determined weak by the new ccanlint. For instance, we have dictionary.c
and iniparser.c , I'm only testing iniparser functions (which test the
dictionary routines).
ccanlint says:
root at tower:~/desktop/ccan # tools/ccanlint/ccanlint -d ccan/iniparser
Total score: 5/5
make check gives:
<snip>
Testing crcsync...
Testing grab_file...
Testing hash...
# Byte 0, range 910-1100
# Byte 1, range 913-1095
# Byte 2, range 920-1092
# Byte 3, range 932-1068
# hash_pointer byte 0, range 912-1101
# hash_pointer byte 1, range 916-1116
# hash_pointer byte 2, range 916-1083
# hash_pointer byte 3, range 943-1067
# hash_pointer byte 0, range 44200-44220
Testing iniparser...
Testing list...
Testing read_write_all...
</snip>
Note to others writing tests, if you have to open a file, make sure you
open it with a path relative to the root ccan directory :) For instance,
my tests have to open ccan/iniparser/test/test.ini
> Yes, it is quite sweet. Our setup isn't optimal (again, the aim is for
> ccanlint to drive the tests) but it's shown its value and it's *simple*.
> We owe the perl guys a beer...
Its funny, I've used more code FROM Perl than I've written IN Perl. I
probably owe them a keg by that token :) I am really excited to see the
new ccanlint come into development. I think it will be as popular as it
is useful.
I'll upload the module in the next hour and send an e-mail to explain
it. It should just drop right in.
Cheers,
--Tim
More information about the ccan
mailing list