Unit Tests for FreeBSD Kernel APIs?

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jul 5 10:55:42 UTC 2011


On 06/24/2011 03:14 PM, John Baldwin wrote:
> 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).
> 

The background for my question is that we want to use the FreeBSD 8.2 network
and USB stack for another operating system (RTEMS).  Thus we have to implement
several core APIs in terms of our operating system services.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the freebsd-hackers mailing list