On Friday, June 24, 2011 3:23:11 am Sebastian Huber wrote:
> Hello,
> 
> exists there some unit tests for FreeBSD kernel APIs, e.g. mutex(9),
> condvar(9), etc.?
> 
> Have a nice day!

Hmm, I have a kernel module that does some tests, but it is not in the tree.  
One of the issues is that many of the tests you want to do for some of these
APIs involve timing.  For rwlocks, for example, I used KTR traces and used
a kernel module that forked 4 threads to all compete over a single lock.  I
then verified via KTR traces that every branch was taken (and made liberal
use of KASSERT()s which caught a few edge cases I had missed initially).

-- 
John Baldwin
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to