<div dir="ltr">Do you have any preferences or recommendations for a unit testing framework? Distributed network software isn't too hard - if you abstract out the socket stuff you're just dealing with packets being sent to a callback function - and if packets can be sent to it, then test data works fine too. It takes a bit longer to write the first lot of tests, but it's really important to have them - very good for verifying RFC compliance (e.g. the recent RIPng TTL isue) as well as finding bugs.<div>
<br></div><div style>Does anyone know of a good C unit testing framework?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 9:09 PM, Ondrej Zajicek <span dir="ltr"><<a href="mailto:santiago@crfreenet.org" target="_blank">santiago@crfreenet.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Jun 18, 2013 at 08:48:41AM +1200, Sam Russell wrote:<br>
> Is there a set of unit tests for BIRD somewhere? I don't know where I'd<br>
> start building them, but I'm happy to do the legwork on the coding - unit<br>
> testing will make it a lot easier to add new modules and guarantee the<br>
> functionality of existing ones.<br>
<br>
</div></div>There is no systematic unit test framework, there are some tests<br>
scattered in code (like filter/test.conf or 'ifdef TEST' code in<br>
nest/rt-fib.c). Some simple (perhaps make based?) unit testing framework<br>
could be useful, OTOH distributed network software is pretty hard to<br>
test by unit testing (you could test consistency of some core data<br>
structures, but testing standards compliance for e.g. OSPF is much<br>
harder problem).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Elen sila lumenn' omentielvo<br>
<br>
Ondrej 'SanTiago' Zajicek (email: <a href="mailto:santiago@crfreenet.org">santiago@crfreenet.org</a>)<br>
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, <a href="http://wwwkeys.pgp.net" target="_blank">wwwkeys.pgp.net</a>)<br>
"To err is human -- to blame it on a computer is even more so."<br>
</font></span><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iEYEARECAAYFAlHAI9wACgkQw1GB2RHercNFTwCcC8fZFjwjm5geyKoqXvVmGt5l<br>
ob4An1QpHGUjnVteHavV3W0FrfB0d93k<br>
=Z/UG<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br></div>