Closed avtolstoy closed 2 years ago
@avtolstoy Given that the issue is platform-specific and that we don't have unit tests for the node-usb backend at the moment, how about we add an integration test for this fix instead?
@sergeuz I was more thinking of using fake-usb and validating that when this quirk is set the requests that should not have a data stage do have one.
I'll need to double-check, I think this quirk should work just fine on any platform, so perhaps adding an integration tests is also a solution here.
I was more thinking of using fake-usb and validating that when this quirk is set the requests that should not have a data stage do have one
That would work if the fix was implemented in DeviceBase
, but it's implemented in the USB backend classes that are mocked by fake-usb.
Added integration test for the quirk. Works on all devices if forced.
Some platforms have non-compliant behavior where control OUT (Host to Device) transfers over EP0 always require a data stage to be present even if setup request has wLength=0, otherwise the request does not complete and times out.
@sergeuz Any suggestions on unit tests for this?
See also https://github.com/particle-iot-inc/device-constants/pull/12