PATCH: add ATF tests in sys

Alan Somers asomers at freebsd.org
Wed Jan 22 00:02:51 UTC 2014


On Tue, Jan 21, 2014 at 4:56 PM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>
>> On Jan 21, 2014, at 14:45, Alan Somers <asomers at freebsd.org> wrote:
>>
>> I rewrote the unix seqpacket tests in ATF.  The hard part is adding
>> them to the build.  The linked patch adds them in the directory
>> sys/kern/tests and builds them as part of buildworld, not buildkernel.
>> They get installed to /usr/tests/sys/kern, but the intermediate
>> objects are stored in /usr/obj/sys/kern/tests.  That means that you
>> can't have different tests associated with different kernel configs.
>> I think that this is desirable, because you wouldn't be able to
>> install tests for different kernel configs anyway, given our chosen
>> layout of /usr/tests.
>>
>> Please comment on the parts of this patch that deal with Makefiles.
>> Is this the appropriate way to add sys tests to the build?  Shouldn't
>> I be building them in buildkernel instead of buildworld?  I couldn't
>> find a good way to do that.
>
> I bypassed that for simplicity and placed the tests in tests/sys/kern/... etc. Shoehorning things into our overly complex kernel build system just seems like a really bad idea... Just make it load as a driver, loadable, and dependent on kern.features to run..?
> Cheers!
> -Garrett

I tried to place the tests as closely as possible to the source code
that they're testing, according to
https://wiki.freebsd.org/TestSuite/Structure#Makefiles_for_test_programs
.  I don't feel strongly about it either way, but I think Simon and
jmmv do.

FWIW, the tests run as a userland program, not in kernel mode.

-Alan


More information about the freebsd-testing mailing list