Registered 2012-07-20 by Martin Pitt

umockdev mocks hardware devices for creating unit tests for libraries and programs that handle Linux hardware devices.

It also provides tools to record the properties and behaviour of particular devices, and to run a program or test suite under a test bed with the previously recorded devices loaded. This also allows developers of software like gphoto or libmtp to receive these records in bug reports and recreate the problem on their system without having access to the affected hardware.

The UMockdevTestbed class builds a temporary sandbox for mock devices. Right now this covers sysfs, uevents, basic support for /dev devices, and recording/mocking usbdevfs ioctls (for PtP/MTP devices), but other aspects will be added in the future. You can add a number of devices including arbitrary sysfs attributes and udev properties, and then run your software in that test bed that is independent of the actual hardware it is running on. With this you can simulate particular hardware in virtual environments up to some degree, without needing any particular privileges or disturbing the whole system.

The library supports gobject-introspection and builds a VAPI, so that you can also use it with Python, JavaScript, and other languages which support GI, and Vala.

Project information

Maintainer:
Martin Pitt
Driver:
Not yet selected
Licence:
GNU LGPL v2.1

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Bazaar
Programming languages:
C, Vala

All packages Packages in Distributions

Get Involved

  • warning
    Report a bug
  • warning
    Ask a question
  • warning
    Help translate

Downloads

Latest version is 0.11
released on 2018-02-08

All downloads

Announcements

  • Releases moved to GitHub on 2018-02-28
    Recent release tarballs now get published (automatically) on https://github.c...