Commit Graph

3 Commits

Author SHA1 Message Date
Alexander V. Chernikov
3e5d0784b9 Testing: add framework for the kernel unit tests.
This changes intends to reduce the bar to the kernel unit-testing by
 introducing a new kernel-testing framework ("ktest") based on Netlink,
 loadable test modules and python test suite integration.

This framework provides the following features:
* Integration to the FreeBSD test suite
* Automatic test discovery
* Automatic test module loading
* Minimal boiler-plate code in both kernel and userland
* Passing any metadata to the test
* Convenient environment pre-setup using python testing framework
* Streaming messages from the kernel to the userland
* Running tests in the dedicated taskqueues
* Skipping or parametrizing tests

Differential Revision: https://reviews.freebsd.org/D39385
MFC after:	2 weeks
2023-04-14 15:47:55 +00:00
Alexander V. Chernikov
864ea9abfb pytest: add an example test fetching test directory and ATF vars.
MFC after:	2 weeks
2023-01-25 13:55:33 +00:00
Alexander V. Chernikov
8161b823d7 testing: add python test examples
Simplify the adoption of python tests by proving some examples,
 utilising commonly-used patterns.

Differential Revision: https://reviews.freebsd.org/D37902
Reviewed by:	asomers
MFC after:	2 weeks
2023-01-01 15:29:29 +00:00