History log of /freebsd/tests/atf_python/utils.py (Results 1 – 7 of 7)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 97760572 15-May-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

testing: add public method for requiring module presense in pytest

MFC after: 2 weeks


# 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 ...


Revision tags: release/13.2.0
# d9af4219 01-Apr-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

tests: refactor atf_python a bit

* Move more logic from conftest.py to the actual atf_pytest handler
* Move nodeid_to_method_name() to the utils.py so it can be shared

MFC after: 2 weeks


# 6332ef89 09-Feb-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

testing: handling non-root users with VNETs in pytest-based tests.

Currently isolation and resource requirements are handled directly
by the kyua runner, based on the requirements specified by the

testing: handling non-root users with VNETs in pytest-based tests.

Currently isolation and resource requirements are handled directly
by the kyua runner, based on the requirements specified by the test.
It works well for simple tests, but may cause discrepancy with tests
doing complex pre-setups. For example, all tests that perform
VNET setups require root access to properly function.

This change adds additional handling of the "require_user" property
within the python testing framework. Specifically, it requests
root access if the test class signals its root requirements and
drops privileges to the desired user after performing the pre-setup.

Differential Revision: https://reviews.freebsd.org/D37923
MFC after: 2 weeks

show more ...


# bb60d265 01-Jan-2023 Alexander V. Chernikov <melifaro@FreeBSD.org>

testing: fix tests without cleanup in pytest.

It was broken by 89ffac3b01fb3f6749799ac67b7d94056a36778e,
which added "cleanup" method to the base test class,
resulting in reporting cleanup for all

testing: fix tests without cleanup in pytest.

It was broken by 89ffac3b01fb3f6749799ac67b7d94056a36778e,
which added "cleanup" method to the base test class,
resulting in reporting cleanup for all of the tests.

show more ...


# f63825ff 29-Dec-2022 Alexander V. Chernikov <melifaro@FreeBSD.org>

testing: improve python vnet wrapper.

* Derive jail name from class name and method name, instead of just
method name. This change reduces the chances of different tests
clashing.
Old: 'jail_test_o

testing: improve python vnet wrapper.

* Derive jail name from class name and method name, instead of just
method name. This change reduces the chances of different tests
clashing.
Old: 'jail_test_one'. New: 'pytest:TestExampleSimplest:test_one'
* Simplify vnetX_handler() method signature by skipping obj_map (unused)
and pipe. The latter can be accessed as the vnet property.
* Add `send_object()` method as a pair to the `wait_object` inside the
VnetTestTemplate class.
* Add `test_id` property to the BaseTest method. Previously it was
provided only for the VnetTestTemplate class. This change makes
the identifier easily accessible for all users.

MFC after: 2 weeks

show more ...


# 3873bdc2 16-Dec-2022 Alexander V. Chernikov <melifaro@FreeBSD.org>

netlink: connect netlink tests to the build

Reviewed By: ngie
Differential Revision: https://reviews.freebsd.org/D37708