Skip to content

Fix a bunch of test case failures

Peter Hutterer requested to merge whot/libei:wip/test-fixes into main

First commit ixes a memleak caused by anything having a device ref when ei_device_remove() is called. This can happen e.g. if there is a pending event that hasn't been flushed with a ei_device.frame yet.

Example Sequence:

  • client sends an event, event is queued to pending with a ref to the device
  • next event causes a client disconnect, queuing an emulated seat bind of 0
  • server calls eis_device_remove()
  • client calls eis_device_unref()

One ref is still held in the pending event that was never visible to the server, preventing the device from being freed.

All the others were minor races that randomly triggered depending on timing.

Merge request reports

Loading