Solaar/tests
Ken Sanislo 5376bde14f receiver: close paired devices before dropping the handle
Receiver.close() nulled its own handle first and only then closed its
paired devices. A paired device's feature_request() sends over the
receiver's handle, so the device.cleanups callbacks that run inside
Device.close() - release RGB SW control, restore onboard-profile mode -
were issued with handle=None, failed, and were silently swallowed. On
every clean Solaar quit a receiver-paired keyboard was left in host
mode; on the G915 TKL that means dead F-keys until a power cycle
(#3266). Wired devices were unaffected: Device.close() already runs
cleanups before clearing its handle, per its own comment.

Close the devices first, then drop the handle, mirroring Device.close().
Also log cleanup write failures in rgb_power.cleanup at debug level
instead of swallowing them silently, so a torn-down transport can't
hide; debug because failures are routine when the device is unplugged.

The regression test fails against the previous ordering.
2026-07-12 02:39:52 -07:00
..
hid_parser Introduce hid_parser tests 2024-09-15 09:19:13 -04:00
hidapi hidapi: Explicitly load hidapi/udev implementation 2024-10-11 07:42:38 -04:00
logitech_receiver receiver: close paired devices before dropping the handle 2026-07-12 02:39:52 -07:00
solaar tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00
test_keysyms keysyms: Introduce tests for this package 2024-10-11 07:42:38 -04:00
__init__.py tests: Introduce tests with pytest 2024-02-10 13:58:20 -05:00
conftest.py tests: mock the libnotify backend so the suite raises no real notifications 2026-05-21 10:15:12 -04:00