Closed sicelo closed 7 months ago
In ioctl_tree.c, I see:
I_NAMED_SIMPLE_STRUCT_IN(EVIOCGSW(32), "EVIOCGSW", 0, ioctl_insertion_parent_stateless),
half thinking that it only accepts 32 bytes for the buffer length (in this case SW_MAX / 8
). Maybe that should be something like:
I_NAMED_SIMPLE_STRUCT_IN(EVIOCGSW(0), "EVIOCGSW", 32, ioctl_insertion_parent_stateless),
Instead?
I got it working by using iio-sensor-proxy
itself during the ioctl recording stage, instead of evtest
:-)
I am working on support for (old-school) evdev-based proximity sensors in iio-sensor-proxy.
The test suite uses
umockdev
, and I have generated the required files usingumockdev-record
:Feeding that data into
evtest
is successful:However, with
iio-sensor-proxy
, the exact same data fails on theioctl
call in https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/blob/e0995ca1287c6c2797f7e8b20cc5e7d3fee7ca0c/src/drv-input-proximity.c#L162-L163, as shown below:On the actual hardware (on which the umockdev data was generated), the code runs fine and
iio-sensor-proxy
successfully monitors the state of the proximity sensor as expected.I would appreciate any ideas for where I might have made a mistake, and/or how to get the above test to succeed.