Developers' Handbook: Chapter on testing

Ahsan Barkati ahsanbarkati at
Sat Sep 12 12:55:13 UTC 2020

On Fri, Sep 11, 2020 at 6:33 AM Lawrence Greening <lg49152 at>

> Hi.
> I am writing a chapter on testing for the FreeBSD Developers' Handbook.
That's great. We have been looking for it for quite a long time.

> The following topics are expected to be covered:
> * FreeBSD Test Suite
> * Kyua
> * Automated Testing Framework (ATF)
> * Organization of current FreeBSD tests.
> * Using automation and virtualization to reduce the overhead in setting up
> the test infrastructure.
> * Examples of standard types of testing, e.g. unit tests, functional
> testing, load testing, etc.
> * Reproducibility in building and testing.
> However, this list is just a starting point. The scope and organization
> will evolve as the chapter is written.
> After reading the chapter, the reader should be able to do at least the
> following:
> * Install and configure the necessary testing tools, test suites, etc. for
> the purposes of testing FreeBSD.
> * Run tests.
> * Write tests.
> * Submit tests.
> The chapter will include walkthroughs and guided or cumulative examples.
> At this preliminary stage, I am interested in the following feedback:
> (1) What material do you want to see covered?
> (2) What material do you want to see prioritized?
> (3) What general approach(es) do you want to see taken towards the subject
> matter?
> (4) Are there good example tests or areas of the code base that deserve
> focus, either because of their importance, usefulness as examples, history
> of regressions, etc.?

We have some good tests for the firewalls, which makes use of vnet jails to
create a network setup required for testing. This method can be very useful
for any network related tests. We have example tests in
`/tests/sys/netpfil/pf` and also have a method to write tests for all the
three firewalls in a single body (tests for common functionalities in the
firewalls) here -> `/tests/sys/netpfil/common`. You can also find a small
writeup on this common testing method here ->

I'd love to provide you with any assistance which falls under my reach. I
am excitedly looking forward to a chapter on testing.

More information about the freebsd-testing mailing list