#
3e5d0784 |
| 14-Apr-2023 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
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, loadab
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
show more ...
|
#
8eb2bee6 |
| 25-Jun-2022 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
testing: Add basic atf support to pytest.
Implementation consists of the pytest plugin implementing ATF format and a simple C++ wrapper, which reorders the provided arguments from ATF format to the
testing: Add basic atf support to pytest.
Implementation consists of the pytest plugin implementing ATF format and a simple C++ wrapper, which reorders the provided arguments from ATF format to the format understandable by pytest. Each test has this wrapper specified after the shebang. When kyua executes the test, wrapper calls pytest, which loads atf plugin, does the work and returns the result. Additionally, a separate python "package", `/usr/tests/atf_python` has been added to collect code that may be useful across different tests.
Current limitations: * Opaque metadata passing via X-Name properties. Require some fixtures to write * `-s srcdir` parameter passed by the runner is ignored. * No `atf-c-api(3)` or similar - relying on pytest framework & existing python libraries * No support for `atf_tc_<get|has>_config_var()` & `atf_tc_set_md_var()`. Can be probably implemented with env variables & autoload fixtures
Differential Revision: https://reviews.freebsd.org/D31084 Reviewed by: kp, ngie
show more ...
|