Merge lp://staging/~peter-hutterer/evemu/evemu-event into lp://staging/evemu

Proposed by Peter Hutterer
Status: Rejected
Rejected by: Chase Douglas
Proposed branch: lp://staging/~peter-hutterer/evemu/evemu-event
Merge into: lp://staging/evemu
Diff against target: 299 lines (+191/-3)
7 files modified
.bzrignore (+2/-0)
include/evemu.h (+17/-0)
src/evemu.c (+17/-0)
src/libutouch-evemu.ver (+2/-0)
tools/Makefile.am (+2/-1)
tools/evemu-device.txt (+7/-2)
tools/evemu-event.c (+144/-0)
To merge this branch: bzr merge lp://staging/~peter-hutterer/evemu/evemu-event
Reviewer Review Type Date Requested Status
Chase Douglas (community) Needs Fixing
Stephen M. Webb (community) Approve
Review via email: mp+108661@code.staging.launchpad.net

Description of the change

Add a new tool "evemu-event" for single-event testing

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

OK, another small step in the right direction.

This will require a libtool version mod for an API addition before the next release.

review: Approve
Revision history for this message
Chase Douglas (chasedouglas) wrote :

* I would rather see getopt used, but evemu-event is small and simple so I'm ok with this parsing technique.

* In evemu-event there is not enough argument checking. strtol() calls do not have any error checking. If I specify a code, type, or value of 83mdu, it will use 83. The endptr should be checked to ensure the entire argument is valid. The arguments should also be bounds checked: 0 <= type <= USHRT_MAX, 0 <= code <= USHRT_MAX, INT_MIN <= value <= INT_MAX.

* When creating the sync event, use the evdev constants EV_SYN and SYN_REPORT.

* The sync event playing should be checked for errors too.

I think this is a really useful addition :). Thanks!

review: Needs Fixing
50. By Stephen M. Webb

fix input node search algorithm for duplicate device names (lp: #735614)
- changed the device node detection algorithm to compare node creation times instead of assuming the highest-numbered node is the latest created.

51. By Stephen M. Webb

release 1.0.9

52. By Thomas Voß

Fixed failing tests for device creation.

53. By Peter Hutterer

Add evemu-event to play a single event from the commandline

Some testing scenarios require specific events to be generated that are hard
to create from a physical device (e.g. touchpad motion purely on the
positive X axis with no Y axis). For those scenarios, recording a device and
hacking the evemu event files is time consuming.

evemu-event simply allows this scenario to be scripted.

54. By Peter Hutterer

Use EV_SYN and SYN_REPORT instead of 0/0

55. By Peter Hutterer

Print errors if SYN event creation/playback failed

56. By Peter Hutterer

Always close the fd, even on errors.

57. By Peter Hutterer

Check arguments' strtol conversion for errors

58. By Peter Hutterer

Don't open the device until we've parsed all arguments successfully

59. By Peter Hutterer

Range-check argument values for evemu-event

type must be less than EV_MAX
code's maximum is effectively KEY_MAX but let's use USHRT_MAX to be safe for
future key additions
value is int value range

60. By Peter Hutterer

Use getopt for option parsing

This is a change in the user interface, the arguments must now be specified
instead of just listed in the correct order.

Unmerged revisions

60. By Peter Hutterer

Use getopt for option parsing

This is a change in the user interface, the arguments must now be specified
instead of just listed in the correct order.

59. By Peter Hutterer

Range-check argument values for evemu-event

type must be less than EV_MAX
code's maximum is effectively KEY_MAX but let's use USHRT_MAX to be safe for
future key additions
value is int value range

58. By Peter Hutterer

Don't open the device until we've parsed all arguments successfully

57. By Peter Hutterer

Check arguments' strtol conversion for errors

56. By Peter Hutterer

Always close the fd, even on errors.

55. By Peter Hutterer

Print errors if SYN event creation/playback failed

54. By Peter Hutterer

Use EV_SYN and SYN_REPORT instead of 0/0

53. By Peter Hutterer

Add evemu-event to play a single event from the commandline

Some testing scenarios require specific events to be generated that are hard
to create from a physical device (e.g. touchpad motion purely on the
positive X axis with no Y axis). For those scenarios, recording a device and
hacking the evemu event files is time consuming.

evemu-event simply allows this scenario to be scripted.

52. By Thomas Voß

Fixed failing tests for device creation.

51. By Stephen M. Webb

release 1.0.9

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches