Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2014 16:23:25 -0800
From:      Garrett Cooper <yaneurabeya@gmail.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Subject:   Re: PATCH: add ATF tests in sys
Message-ID:  <7051E061-C054-47BF-A5B2-747B9D3E85A1@gmail.com>
In-Reply-To: <CAOtMX2goL4yvGjYZX8Gmk=rx0du5yrsQ_W-Y8XWo0WkCNDjwkw@mail.gmail.com>
References:  <CAOtMX2iiSH9DvE73_7V=A%2ByqObROmvJu7VRTMG7K74eMtHk4=g@mail.gmail.com> <C2E6F1D5-B409-4F2E-B856-C65473BCC3A0@gmail.com> <CAOtMX2goL4yvGjYZX8Gmk=rx0du5yrsQ_W-Y8XWo0WkCNDjwkw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Jan 21, 2014, at 16:02, Alan Somers <asomers@freebsd.org> wrote:
>=20
>> On Tue, Jan 21, 2014 at 4:56 PM, Garrett Cooper <yaneurabeya@gmail.com> w=
rote:
>>=20
>>> On Jan 21, 2014, at 14:45, Alan Somers <asomers@freebsd.org> wrote:
>>>=20
>>> 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.
>>>=20
>>> 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.
>>=20
>> I bypassed that for simplicity and placed the tests in tests/sys/kern/...=
 etc. Shoehorning things into our overly complex kernel build system just se=
ems like a really bad idea... Just make it load as a driver, loadable, and d=
ependent on kern.features to run..?
>> Cheers!
>> -Garrett
>=20
> 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.
>=20
> FWIW, the tests run as a userland program, not in kernel mode.

Fwiw I spent months mulling over various details (this was just one point) w=
ith gnn, marcel, and mfleming. The consensus was that that was a really bad i=
dea because it wasn't terribly clear that tests covered a particular area, a=
nd some sys/ tests could cover multiple areas (pjdfstest for instance).

I mirrored the exact structure in the source tree, but avoided tainting thin=
gs in sys/... Because integrating sys/ into buildworld and starting to mix k=
ernel and world build logic together will irritate a large number of kernel d=
evs and userland devs. This was the path of least resistance...
HTH,
-Garrett=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7051E061-C054-47BF-A5B2-747B9D3E85A1>