[Differential] [Changed Subscribers] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
jhb (John Baldwin)
phabric-noreply at FreeBSD.org
Thu Jan 29 14:58:37 UTC 2015
jhb added a subscriber: jhb.
jhb added a comment.
Hmm, I do think the idea of a kernel test framework should be discussed in its own right. I have implemented a much simpler one on my own for unit tests of locking primitives that you can see here. These worked by declaring tests in linker sets in a kernel module. Loading the module implicitly runs the tests. I have other changes in this branch to allow "catching" panics like exceptions and similar changes for witness as well.
The test framework (much simpler) can be found at:
http://p4db.freebsd.org/fileDownLoad.cgi?FSPC=//depot/user/jhb/lock/kern/subr_test.c&REV=6
http://p4db.freebsd.org/fileDownLoad.cgi?FSPC=//depot/user/jhb/lock/sys/unittest.h&REV=2
Sample test modules can be found here:
http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/jhb/lock/modules/test&HIDEDEL=NO
I think "test" is probably a better name for a subdir of test modules as it is more consistent with what we are doing in userland with kyua.
REVISION DETAIL
https://reviews.freebsd.org/D1711
To: rrs, gnn, rwatson, adrian, sbruno, lstewart, imp, hselasky
Cc: jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net
More information about the freebsd-net
mailing list