aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2023-12-13 01:28:19 +0100
committerTormod Volden <debian.tormod@gmail.com>2023-12-19 00:59:34 +0100
commit7c3d9ec61cfaf4d7e64839eb0be33a50528ba4f2 (patch)
treeca5db5418e66dbdd308657f8753e2c75e262dd41
parent5f9abfbe27e060eadd3c1062a925fba47786bc2a (diff)
downloadlibusb-7c3d9ec61cfaf4d7e64839eb0be33a50528ba4f2.tar.gz
tests/stress_mt: Ignore device descriptor mismatch for Windows HID
Some device descriptor fields are hard-coded by the HID backend, so they will often not match. It is complicated to narrow this down to HID devices, so we simply ignore these fields on Windows wholesale. Hopefully we will fix the HID backend later, and this workaround can then be reverted. References #1360 References #1378 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--libusb/version_nano.h2
-rw-r--r--tests/stress_mt.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 91b3d02..d080566 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11853
+#define LIBUSB_NANO 11854
diff --git a/tests/stress_mt.c b/tests/stress_mt.c
index d9a426b..3a8f321 100644
--- a/tests/stress_mt.c
+++ b/tests/stress_mt.c
@@ -176,14 +176,17 @@ static thread_return_t THREAD_CALL_TYPE init_and_exit(void * arg)
}
ASSERT_EQ(bLength);
ASSERT_EQ(bDescriptorType);
+#if !defined(PLATFORM_WINDOWS)
+ /* these are hardcoded by the winusbx HID backend */
ASSERT_EQ(bcdUSB);
ASSERT_EQ(bDeviceClass);
ASSERT_EQ(bDeviceSubClass);
ASSERT_EQ(bDeviceProtocol);
ASSERT_EQ(bMaxPacketSize0);
+ ASSERT_EQ(bcdDevice);
+#endif
ASSERT_EQ(idVendor);
ASSERT_EQ(idProduct);
- ASSERT_EQ(bcdDevice);
ASSERT_EQ(iManufacturer);
ASSERT_EQ(iProduct);
ASSERT_EQ(iSerialNumber);