Re: [PATCH] docs: UML: Mention telnetd for port channel

2022-03-11 Thread Jonathan Corbet
Vincent Whitchurch writes: > It is not obvious from the documentation that using the "port" channel > for the console requires telnetd to be installed (see port_connection() > in arch/um/drivers/port_user.c). Mention this, and the fact that UML > will not boot until a client connects. > > Signed

Re: [RFC v1 09/10] regulator: tps62864: add roadtest

2022-03-11 Thread Mark Brown
On Fri, Mar 11, 2022 at 05:24:44PM +0100, Vincent Whitchurch wrote: This looks like it could be useful, modulo the general concerns with mocking stuff. I've not looked at the broader framework stuff in any meanigful way. > +@classmethod > +def setUpClass(cls) -> None: > +insmod("

[RFC v1 08/10] iio: light: vcnl4000: add roadtest

2022-03-11 Thread Vincent Whitchurch
Add roadtests for the vcnl4000 driver, testing several of the driver's features including buffer and event handling. Since it's the first IIO roadtest testing the non-sysfs parts, some support code for using the IIO ABI is included. The different variants supported by the driver are in separate t

[RFC v1 07/10] iio: light: opt3001: add roadtest

2022-03-11 Thread Vincent Whitchurch
Add a regression test for the problem fixed by the following patch, which would require specific environmental conditions to be able to be reproduced and regression-tested on real hardware: iio: light: opt3001: Fixed timeout error when 0 lux https://lore.kernel.org/lkml/20210920125351.6569-1-va.

[RFC v1 10/10] rtc: pcf8563: add roadtest

2022-03-11 Thread Vincent Whitchurch
Add a roadtest for the PCF8563 RTC driver, testing many of the features including alarm and invalid time handling. Since it's the first roadtest for RTC, some helper code for handling the ABI is included. The following fixes were posted for problems identified during development of these tests:

[RFC v1 05/10] roadtest: add build files

2022-03-11 Thread Vincent Whitchurch
Add a Makefile and other miscellaneous build-related files for the roadtest framework. To make it easier to run the tests on systems which do not have the required libraries or Python version, a Dockerfile is included and the Makefile has built-in support for running the tests in a Docker containe

[RFC v1 04/10] roadtest: add base config

2022-03-11 Thread Vincent Whitchurch
Add the base config options for the roadtest kernel (generated with "savedefconfig"). roadtest uses a single kernel for all tests and the drivers under test are built as modules. Additional config options are added by merging config fragments from each subsystems' test directory. The kernel is b

[RFC v1 09/10] regulator: tps62864: add roadtest

2022-03-11 Thread Vincent Whitchurch
Add a roadtest for the recently-added tps62864 regulator driver. It tests voltage setting, mode setting, as well as devicetree mode translation. It uses the recently-added devicetree support in regulator-virtual-consumer. All the variants supported by the driver have identical register interface

[RFC v1 03/10] roadtest: add framework

2022-03-11 Thread Vincent Whitchurch
Add the bulk of the roadtest framework. Apart from one init shell script, this is written in Python and includes three closely-related parts: - The test runner which is invoked from the command line by the user and which starts the backend and sends the test jobs and results to/from UML.

[RFC v1 06/10] roadtest: add documentation

2022-03-11 Thread Vincent Whitchurch
Add documentation for the roadtest device driver testing framework. This includes a "how to write your first test" tutorial. Signed-off-by: Vincent Whitchurch --- Documentation/dev-tools/index.rst| 1 + Documentation/dev-tools/roadtest.rst | 669 +++ 2 files changed

[RFC v1 00/10] roadtest: a driver testing framework

2022-03-11 Thread Vincent Whitchurch
This patchset proposes roadtest, a device-driver testing framework. Drivers are tested under User Mode Linux (UML) and interact with mocked/modelled hardware. The tests and hardware models are written in Python, the former using Python's built-in unittest framework. Drivers are tested via their

[RFC v1 02/10] roadtest: add C backend

2022-03-11 Thread Vincent Whitchurch
Add the C parts of the roadtest framework. This uses QEMU's libvhost-user to implement the device side of virtio-user and virtio-gpio and bridge them to the Python portions of the backend. The C backend is also responsible for starting UML after the virtio device implementations are initialized.