Closed jluebbe closed 1 month ago
Attention: Patch coverage is 0%
with 32 lines
in your changes missing coverage. Please review.
Project coverage is 56.7%. Comparing base (
5e4ab58
) to head (7ab6240
). Report is 75 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
labgrid/util/agents/usb_hid_relay.py | 0.0% | 32 Missing :warning: |
:exclamation: There is a different number of reports uploaded between BASE (5e4ab58) and HEAD (7ab6240). Click for more details.
HEAD has 1 upload less than BASE
| Flag | BASE (5e4ab58) | HEAD (7ab6240) | |------|------|------| ||5|4|
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Since c9fc5bfdb9da, it was no longer possible to use the same USB relay device from multiple labgrid processes, as the USB device was kept open and claimed.
To fix this, we use a context manager which first claims the USB interface (with retry while busy) and releases it after the transaction.
With this fix, multiple processes can toggle outputs in a busy loop without causing 'USBError(16, 'Resource busy')' failures.
Fixes: c9fc5bfdb9da ("labgrid/util/agents/usb_hid_relay: keep the USB device open")