Wrong calculation resulted in memmoving only the first 32 bytes (i.e. 8
fds) instead of the first 32 fds, resulting in an infinite loop when
cleaning up an iobuf with more than 8 fds.
Even where our client pretends to have higher interface versions, we
always send back version 1 from the EIS implementation.
This test probably won't really trigger anything useful until we switch to
version 2 somewhere, so let's hope the code works...
If we create a pointer and an absolute pointer in a test, we end up with
two devices that both have button and scroll capabilities.
Overwriting those results in a dangling ref to the device.
Same as the libei function, there's a use-case for this especially when
dealing with receiver contexts. libei filters those but we can't rely on
that in the server so using this is a workaround.
The ABI job git cloned from upstream and then compared HEAD with the
last ABI break. Problem though: the HEAD was origin/main, not the actual
HEAD from the merge request.
Fix this by adding upstream as a remote and fetching from it. And while
we're there update to the last ABI break commit sha and move the
abicheck bits into before_script.
Note that the remote has the CI job ID appended, this avoids conflicts
when the git repo is re-used betweenn jobs and the upstream remote
already exists.
Commit da37da1308 "ei: change the API to match the protocol interfaces closer"
change the event type numbers for per-capability grouping but the
follow-up commit e6954b76d for eis didn't do the same. Right now the
event types are out sync.
This doesn't technically matter as this is a libeis implementation
detail (those types don't exist on the protocol) but it'd still be nice
to sync them before we ship 1.0.
This is an ABI break but not an API break.
For frame events on a device it's likely that we want to use eis_now()
which takes the context. So let's make this easy enough to access
without having to carry extra variables in the caller. And the same for
the seat as well.
Discrete values are multiples of 120 and it's unlikely the device to be
emulated is *that* precise, so let's assume it's a bug and the client
wasn't aware of the 120-multiple requirement.
This is the only request that creates a new object but doesn't specify
the version for that object, courtesy of copy/paste from the wayland
protocol. In libei/libeis this a bit was hidden away so it didn't get
noticed - but it was already buggy: libei would always hardcode to
version 1 but libeis would take whichever ei_callback version was agreed
upon during handshake. This version could be higher than 1.
This is a protocol break but we're still pre-1.0, there are very few
people that will be affected by this and it's better than having to
carry this bug around for years.
Fixes#35
To make this practical to use in a template, we want relations in both
directions. And at least for consistency with other things, these fields
should contain the `Argument` instead of just its name string.
So we need to do this after are the arguments in the message have been
initially parsed. Adding these fields when parsing the request/event
close tag seems to work well enough.
Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Since meson is installed from pip, we'll use the latest stable version
when we build an image. Add an extra job with the fixed minimum version
so we ensure we actually build with that version.
Approximately every user of libei(s) will want something like this for
easier debugging, converting the numeric event type into something that
can be printed into the debug logs.
Let's provide this here so this doesn't need to be duplicated.
This is a bit convoluted because ei-scanner is named like that, so it
cannot be imported as python module. The solution for that is to
copy/rename it with meson to the builddir and run pytest in that. This
also allows us to set the path to the protocol XML file while we're at
it so we can use it as a fixture.
Actual tests are minimal for now, can be extended over time.