Location of test kernel drivers in tree?

Julio Merino jmmv at freebsd.org
Thu Jul 24 01:12:11 UTC 2014


On Tue, Jul 22, 2014 at 7:07 PM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
> Hi all,
>     I need to do some KPI verification and hook that into ATF / kyua.
> Since we don't have RUMP [yet] from NetBSD, I would typically write a
> simple, one-off test driver, hook it into the kernel build and have a
> piece of C or shell code that pokes directly at the driver to get
> access to kernel interfaces.
>     I was wondering if it made sense to put all test drivers into
> sys/tests/<module-name>/..., e.g.
> sys/tests/test_memguard/{Makefile,test_memguard.c}, etc. Is there an
> alternative approach that others use to solve this problem?

I don't have an answer to alternative solutions, but keeping the
helper modules inside tests/sys/ (I think you got that backwards in
your email?) is a good idea.

(Instead of tests/sys/<module-name>/, I'd probably do
tests/sys/<thing-being-tested>/<module-name>/... though, to keep the
helpers next to the only tests that need them. Unless the helper is
really generic and usable by many tests.)


More information about the freebsd-testing mailing list