mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
Current bootrr helpers, assert_device_present and assert_driver_present, use driver and device names, both of which are not part of the kernel's stable ABI and end up requiring extra maintenance whenever those names are changed, in order to check for the expected name on each kernel version. Introduce a new helper, assert_usb_probed, that verifies a USB device has been probed, taking as parameters the device's hardware identifying properties, which are documented kernel ABI: idVendor, idProduct, bcdDevice, bDeviceClass, bDeviceSubClass, bDeviceProtocol, bInterfaceClass, bInterfaceSubClass, bInterfaceProtocol, bInterfaceNumber. A 'count' parameter is also required, to inform the number of devices matching these criteria that should have been probed. This allows the test to verify the probe of multiple identical devices. A '*' can be used as wildcard for any of the matching fields as necessary. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>