NVMe unit tests

Alan Somers asomers at freebsd.org
Wed Jul 29 19:02:58 UTC 2015

On Wed, Jul 29, 2015 at 11:59 AM, Jim Harris <jimharris at freebsd.org> wrote:

> Hi,
> I have a CUnit-based infrastructure with quite a few unit tests for the
> FreeBSD nvme driver.  It enables testing a number of corner cases within
> the driver without requiring real hardware and stubbing kernel behavior in
> some cases to induce the corner cases.  Which leads me to a few questions:
> 1) Is there interest here in having this pushed into HEAD?  Or would a user
> branch be more appropriate?

Head would be ideal.  The tests won't get run if they stay in a user branch.

> 2) Where in the tree should I put it?  In our internal repo, I have it
> under tools/regression/nvme, but maybe sys/dev/nvme/tests is more
> appropriate?

Ngie, jmmv, and I debated this awhile back.  We concluded that the way our
build system works, it isn't appropriate to put ATF tests in sys.  Instead,
they should go in tests/sys/X, where X mirrors the location of the code in
sys.  For nvme, that would be tests/sys/dev/nvme.

Kyua doesn't natively understand CUnit.  So you have two options: run the
tests with the plain test adapter, or convert them all to ATF-C tests.  The
main disadvantage to the plain test adapter is that Kyua won't be aware of
the detailed test results.  For example, if you have 500 CUnit test cases,
Kyua will only report whether the whole suite passed or failed rather than
whether each test case passed or failed.


> Feedback is welcome.
> Thanks,
> -Jim
> _______________________________________________
> freebsd-testing at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-testing
> To unsubscribe, send any mail to "freebsd-testing-unsubscribe at freebsd.org"

More information about the freebsd-testing mailing list