[MIR] umockdev

Bug #1190926 reported by Martin Pitt on 2013-06-14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
umockdev (Ubuntu)

Bug Description

We have some packages with test suites which create a fake /sys structure for simulating particular hardware. This affects at least upower and ubuntu-drivers-common right now. So far these had a copy of a "fakesys.py" module:


However, this stopped working with current udev, as that dropped support for the $SYSFS_PATH environment variable. umockdev is the successor of fakesys.py, has a similar API, but lots of extra features but it does not use $SYSFS_PATH but a preload library which diverts access to /sys, /dev, etc. to a temporary directory testbed. With that, all tests can run as normal user. See https://github.com/martinpitt/umockdev for the README and an introduction.

I am converting ubuntu-drivers-common's test suite to umockdev, and already changed upower's in upstream master some time ago. To be able to continue running selftests during package build I would like to start build-depending on umockdev and use it in test suites. The Ubuntu Phone developers expressed interest in using it as well.

umockdev is nothing that we would put into a default installation, it's purely a testing tool. I am the upstream and Ubuntu developer. There are currently no bugs in Ubuntu; there have been quite a number of upstream bugs so far, but I fixed them all except two wishlist bugs for new features (https://github.com/martinpitt/umockdev/issues).

Please review this package for main inclusion. Thank you in advance!

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in umockdev (Ubuntu):
status: New → Confirmed
Michael Terry (mterry) wrote :

This looks good, but is there a way we could selectively run at least the tests that don't need installation during build? (right now we run them all but use '|| true' which sort of defeats the purpose -- I'd like to see at least some tests run for real)

Changed in umockdev (Ubuntu):
status: Confirmed → Incomplete
Martin Pitt (pitti) wrote :

The tests succeed on amd64 and ARM on the real buildds, but they fail on PPA buildds all over the place (https://launchpad.net/~pitti/+archive/daily-builds/+packages): "libudev: udev_monitor_new_from_netlink_fd: error getting socket: Invalid argument". It seems our virtualized PPAs disallow using libudev somehow. Also, tests fail on powerpc (the ioctl test data doesn't apply to big-endian machines) and i386 (I have no idea why, they pass locally on i386; to be debugged next week).

My intention was to do the real testing in autopkgtest, that just needs http://bugs.debian.org/711209 fixed or worked around more properly; I know how to do that, so I'll look into that on Monday.

Martin Pitt (pitti) wrote :

I did a new upstream version for fixing some endianess issues in the tests and the overzealous test that failed i386. Tests are now fatal for non-daily builds except on powerpc: https://launchpad.net/ubuntu/+source/umockdev/0.2.7-0ubuntu2

For fixing the touchpad and gphoto integration tests on powerpc I'd need physical access to a powerpc machine with a touchpad/a digicam to record the ioctls and USB descriptors there. I don't have that and I am not really interested in doing that (as it stands, Ubuntu doesn't even have a porter box for powerpc).

Should be more adequate for MIR now, thanks for the review!

Changed in umockdev (Ubuntu):
status: Incomplete → New
Michael Terry (mterry) wrote :

Looks good, thanks!

Changed in umockdev (Ubuntu):
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Promoted, thank you!

Changed in umockdev (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.