Page MenuHomeFreeBSD

Kernel Test Framework (built for the callout testing)
ClosedPublic

Authored by rrs on Feb 2 2015, 5:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 10:05 AM
Unknown Object (File)
Sun, Apr 21, 9:59 AM
Unknown Object (File)
Sun, Apr 21, 8:57 AM
Unknown Object (File)
Sun, Apr 21, 8:57 AM
Unknown Object (File)
Sun, Apr 21, 3:48 AM
Unknown Object (File)
Sun, Apr 21, 3:39 AM
Unknown Object (File)
Fri, Apr 5, 6:21 AM
Unknown Object (File)
Fri, Apr 5, 5:05 AM
Subscribers

Details

Summary

In order to fully test the callout system this adds a kernel test
framework which allows for multiple threads to be executing
tests within the kernel. The user loads the kld into the kernel
and then uses a sysctl interface to kick off the test.

Test Plan

Well, you test the testing interface I guess with tests .. which is
what the interface is for ;-)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rrs retitled this revision from to Kernel Test Framework (built for the callout testing).
rrs updated this object.
rrs edited the test plan for this revision. (Show Details)
rrs added reviewers: jhb, gnn, imp, lstewart, hselasky.

Warner:

I have thought about your question about moving the headers out of sys/

I think for the kernel test framework base, that would be incorrect.. and even the callout_test.h I will
look to you for a suggestion as to where to put it..

The reason I say it's wrong for the main framework not to be in sys is consider:

  1. Always a program must be written to start the test by twiddling the sysctl with the proper bits.
  2. At the base level you must supply the "test name" and the "number of threads" and also the test "number".
  3. At the individual test level you will pass in test specific parameters.

So this means all programs *must* have the base kernel test framework structure to build
there request upon. Then each individual test must have the test modules specifics..

I am not sure where the test modules specifics should go, for that matter where should the
test programs go that do this.. I have one for callout_test which I never uploaded..

So where then should all this fun goo reside ;-)

R`

My suggestion was moving it out of sys/sys, not out of sys/. sys/test, for example, would be a better place for the headers since it isn't a userland interface at all (which most of sys/sys winds up being).

Should "​kern/kern_testfrwk.c" be a module we can depend on instead of part of the kernel. Might make testing easier!

I agree with hselasky.. putting this as a module and kernel option means that we don't bloat the kernel more on embedded systems...

Yes, please make the requested changes the update and we can get this in.

share/mk/src.opts.mk
156 ↗(On Diff #3590)

This appears to be unnecessary... Is this part of the programs that weren't included in this patch?

rrs edited edge metadata.

Ok this addresses getting all things in a module (framework and callout code test for
new async-drain tests). And it also moves headers to sys/tests

How user processes that execute this find that fun will be a different matter :-)

Just wondering if it is OK to put the source code under sys/modules instead of sys/test.

I have no idea to that Hans though it works well :-)

Just in case, lets go ahead and move all the sources
under

sys/tests/<dir>

This revision was automatically updated to reflect the committed changes.