<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tests/atf_python/utils.py, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-05-15T10:50:55Z</updated>
<entry>
<title>testing: add public method for requiring module presense in pytest</title>
<updated>2023-05-15T10:50:55Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-05-15T10:50:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=97760572a0e4c287a67730df80e7a7b4cf735977'/>
<id>urn:sha1:97760572a0e4c287a67730df80e7a7b4cf735977</id>
<content type='text'>
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Testing: add framework for the kernel unit tests.</title>
<updated>2023-04-14T15:47:55Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-04-14T15:25:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e5d0784b9b5296bda801add034b057ad68237f7'/>
<id>urn:sha1:3e5d0784b9b5296bda801add034b057ad68237f7</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>tests: refactor atf_python a bit</title>
<updated>2023-04-01T19:44:37Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-04-01T19:40:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d9af4219d668f4f16574f757d6fc4c7971a4ef2c'/>
<id>urn:sha1:d9af4219d668f4f16574f757d6fc4c7971a4ef2c</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>testing: handling non-root users with VNETs in pytest-based tests.</title>
<updated>2023-02-09T14:49:27Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-02-09T14:31:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6332ef8941999b0c074d1ece0e1e108447c70b98'/>
<id>urn:sha1:6332ef8941999b0c074d1ece0e1e108447c70b98</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>testing: fix tests without cleanup in pytest.</title>
<updated>2023-01-01T14:11:18Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2023-01-01T14:11:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bb60d265c9825d71cce84a42f66a435f05a6c5f7'/>
<id>urn:sha1:bb60d265c9825d71cce84a42f66a435f05a6c5f7</id>
<content type='text'>
It was broken by 89ffac3b01fb3f6749799ac67b7d94056a36778e,
which added "cleanup" method to the base test class,
 resulting in reporting cleanup for all of the tests.
</content>
</entry>
<entry>
<title>testing: improve python vnet wrapper.</title>
<updated>2022-12-29T19:59:11Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2022-12-29T19:07:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f63825ff21a3bee2630ea8b0ed27a4583cc4242b'/>
<id>urn:sha1:f63825ff21a3bee2630ea8b0ed27a4583cc4242b</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>netlink: connect netlink tests to the build</title>
<updated>2022-12-16T12:02:50Z</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2022-12-16T12:02:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3873bdc2f28f6aab6b426ccb6c85ab2a41483264'/>
<id>urn:sha1:3873bdc2f28f6aab6b426ccb6c85ab2a41483264</id>
<content type='text'>
Reviewed By: ngie
Differential Revision: https://reviews.freebsd.org/D37708
</content>
</entry>
</feed>
