liquidctl/tests
Jonas Malaco 2dd235e536 corsair_hid_psu: read exactly 4 bytes for timedeltas
The response from the device may contain non-nil bytes beyond the range
applicable to the command being replied to.

This is generally taken care of by LINEAR11, ULINEAR16, or when reading
a single byte. However, as we weren't sure how many bytes could actually
be returned by _get_timedelta, it was allowed to try and parse the
entire response as an integer.

That was fine since we were reading with little endianess, and no
devices were known that actually send extra non-nil bytes. That has
changed with the H1500i: only 4 bytes can be safely read from the
response.

Fix _get_timedelta with this new information.

Fixes: #575
Fixes: 64523ef337
2023-02-26 15:31:06 -03:00
..
_testutils.py usb: add default timeouts to all IO methods that support them 2022-09-23 03:20:25 -03:00
rgb.gif kraken3: add LCD screen support for Kraken Z coolers (#479) 2022-09-18 01:22:45 -03:00
test_api.py readme: simplify and improve comments in API example 2022-10-21 03:18:32 -03:00
test_aquacomputer.py aquacomputer: add support for reading virtual temp sensors on Quadro (#528) 2022-10-19 19:40:40 -03:00
test_asetek.py asetek: warn when --non-volatile is passed to unsupported devices 2022-01-28 18:24:57 -03:00
test_asetek_pro.py asetek_pro: move firmware version to initialize output 2022-11-21 18:03:03 -03:00
test_aura_led.py aura_led: capitalize "asus" name for consistency with previous code 2022-05-30 11:18:31 -03:00
test_backward_compatibility_10.py cli: remove old find_all_supported_devices() 2022-02-16 10:17:34 -03:00
test_backward_compatibility_11.py hwmon: identify hidraw devices with a matching hwmon device 2022-02-23 05:23:57 -03:00
test_backward_compatibility_12.py tests: adjust top level comments in backward compatibility tests 2021-04-04 05:17:01 -03:00
test_backward_compatibility_13.py tests: adjust top level comments in backward compatibility tests 2021-04-04 05:17:01 -03:00
test_backward_compatibility_14.py nzxt-kraken3: add support for expanded hwmon driver capabilities (#529) 2022-11-25 22:21:57 +01:00
test_backward_compatibility_15.py hydro_platinum: sort devices of the same family in size order 2021-12-16 06:38:17 -03:00
test_backward_compatibility_18.py asetek_pro: rename CorsairAsetekProDriver to HydroPro 2022-03-04 09:59:52 -03:00
test_cli.py tests: rework cli tests and add test for readme API example 2021-04-29 06:42:49 -03:00
test_commander_core.py commander_core: support 2.10.219 firmware (#501) 2022-09-13 13:45:22 -03:00
test_commander_pro.py commander_pro: add support for changing fan modes during init (#474) 2022-10-16 21:20:44 -03:00
test_corsair_hid_psu.py corsair_hid_psu: read exactly 4 bytes for timedeltas 2023-02-26 15:31:06 -03:00
test_ddr4.py ddr4: read word instead of SMBus Block Read for all TS SPDs 2021-12-11 13:54:09 -03:00
test_hidapi_device.py tests: re-enabled hid_read use/timeout assertion 2022-11-10 15:27:22 -03:00
test_hwmon.py hwmon: rename get_int to read_int (#507) 2022-09-21 14:55:05 -03:00
test_hydro_platinum.py hydro_platinum: replace compute_pec with more efficient mkCrcFun 2022-09-22 00:48:56 -03:00
test_keyval.py keyval: skip symlink test if on Windows with insufficient permissions 2022-05-30 11:44:33 -03:00
test_kraken2.py kraken2: report modern firmware versions in simplified form 2022-05-30 08:16:57 -03:00
test_kraken3.py nzxt-kraken3: add support for expanded hwmon driver capabilities (#529) 2022-11-25 22:21:57 +01:00
test_krakenz3_response.py krakenz3_response: turn black off locally instead of globally 2022-09-21 23:44:42 -03:00
test_nvidia.py nvidia: rog_turing: enable support for more cards 2022-03-02 06:15:34 -03:00
test_nzxt_epsu.py tree: consistently group and sort import statements 2021-01-31 03:09:45 -03:00
test_nzxt_h1_v2.py Support for NZXT H1 V2 case Smart Device (#451) 2022-05-05 06:38:53 -03:00
test_rgb_fusion2.py tree: consistently group and sort import statements 2021-01-31 03:09:45 -03:00
test_smart_device.py smart_device: report V1 device firmware in simplified form 2022-05-30 11:05:59 -03:00
test_smart_device2.py hwmon: remove _input suffix from pwmN attributes (cont.) 2022-04-05 16:47:02 -03:00
test_smbus.py tree: consistently group and sort import statements 2021-01-31 03:09:45 -03:00
test_usb.py tree: consistently group and sort import statements 2021-01-31 03:09:45 -03:00
yellow.jpg kraken3: add LCD screen support for Kraken Z coolers (#479) 2022-09-18 01:22:45 -03:00