FFE: record/replay of input devices using the evemu format

Bug #1295133 reported by Martin Pitt
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
umockdev (Ubuntu)
Fix Released
Wishlist
Martin Pitt

Bug Description

So far umockdev uses a "verbatim binary data" format for recording and replaying device behaviour. The Mir team (in particular, Chris Halse Rogers) has worked on creating automatic tests that simulate touchpad events. Unfortunately the "struct input_event" is platform dependent as it has time_t members, which is a "long" (i. e. 32 bit on i386/arm, and 64 bit o amd64 and others). Thus recorded scripts don't run on other platforms.

So I got asked to implement recording and replaying of input devices using the "evemu event" format, which is textual and platform independent. (https://github.com/martinpitt/umockdev/issues/5). I did that now, and released it in umockdev 0.8:

-------------------------------------------
New features:
- Add new method umockdev_testbed_load_evemu_events() to replay an evemu events
  file into an emulated evdev device. These are platform independent and thus
  more portable than a script record.
- Add -e/--evemu-events=devname=eventsfilename option to umockdev-run, to load
  an evemu .events file. (Issue #5)
- Add -e/--evemu-events=devname=eventsfilename option to umockdev-record, to
  record reads from an evdev device into an evemu .events file. (Issue #5)
- Add umockdev_in_mock_environment(). This function returns whether
  or not the current process is running in a umockdev testbed
  environment. Thanks Chris Halse Rogers!

Bug fixes:
- Only send a "add" uevent from add_device if running in a umockdev
  testbed environment. Fixes error messages when loading devices from
  the umockdev-run commandline. Thanks Chris Halse Rogers!
- Fix detection of mismatching devices when recording into an already existing
  ioctl or script record file.
-------------------------------------------

The new evemu feature is covered by new test cases and don't change behaviour of existing functionality (ioctls, scripts, etc.). Also, umockdev is a pure testing tool, not an user application, so it does not impact released images. There is a potential risk to break tests which are currently succeeding, but I will take responsibility of fixing any regression which comes due to that.

Revision history for this message
Iain Lane (laney) wrote :

Sounds good, as I read this you only add new functionality so nothing existing ought to be affected.

Not sure how much of our CI uses umockdev, but please do keep an eye on it (I'm sure you will anyway).

Go ahead.

Changed in umockdev (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Will sync from sid once it gets imported into LP.

Changed in umockdev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

0.8-1 synced from sid.

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

Other bug subscribers

Remote bug watches

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