Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/hid/hid.spec | 2 +- dlls/hid/hidp.c | 9 +++++++++ include/ddk/hidpi.h | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/hid/hid.spec b/dlls/hid/hid.spec index 98508a456ce..edfdb004fd0 100644 --- a/dlls/hid/hid.spec +++ b/dlls/hid/hid.spec @@ -37,7 +37,7 @@ @ stub HidP_SetData @ stub HidP_SetScaledUsageValue @ stdcall HidP_SetUsageValue(long long long long long ptr ptr long) -@ stub HidP_SetUsageValueArray +@ stdcall HidP_SetUsageValueArray(long long long long ptr long ptr ptr long) @ stdcall HidP_SetUsages(long long long ptr ptr ptr ptr long) @ stdcall HidP_TranslateUsagesToI8042ScanCodes(ptr long long ptr ptr ptr) @ stub HidP_UnsetUsages diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 2933c2ff7ef..e56731d599e 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -388,6 +388,15 @@ NTSTATUS WINAPI HidP_GetUsageValueArray(HIDP_REPORT_TYPE ReportType, USAGE Usage return rc; }
+NTSTATUS WINAPI HidP_SetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usage_page, USHORT collection, USAGE usage, char *value_buf, USHORT value_len, + PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) + +{ + FIXME( "report_type %d, usage_page %x, collection %d, usage %x, value_buf %p, value_len %u, preparsed_data %p, report_buf %p, report_len %u stub!\n", + report_type, usage_page, collection, usage, value_buf, value_len, preparsed_data, report_buf, report_len ); + + return HIDP_STATUS_NOT_IMPLEMENTED; +}
NTSTATUS WINAPI HidP_GetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, diff --git a/include/ddk/hidpi.h b/include/ddk/hidpi.h index fb497f3282f..8c970673ec1 100644 --- a/include/ddk/hidpi.h +++ b/include/ddk/hidpi.h @@ -201,6 +201,9 @@ NTSTATUS WINAPI HidP_InitializeReportForID(HIDP_REPORT_TYPE ReportType, UCHAR Re ULONG WINAPI HidP_MaxUsageListLength(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, PHIDP_PREPARSED_DATA PreparsedData); NTSTATUS WINAPI HidP_GetScaledUsageValue(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PLONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength); NTSTATUS WINAPI HidP_SetUsageValue(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, ULONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, CHAR *Report, ULONG ReportLength); +NTSTATUS WINAPI HidP_SetUsageValueArray( HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, + USAGE Usage, PCHAR UsageValue, USHORT UsageValueByteLength, + PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength ); NTSTATUS WINAPI HidP_SetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index ff73e8eae18..90d68149c1f 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -967,7 +967,7 @@ static const char inf_text[] = "CopyFiles=file_section\n"
"[device_section.NT" EXT ".Services]\n" - "AddService=winetest,0x2,svc_section\n" + "AddService=%s,0x2,svc_section\n"
"[file_section]\n" "winetest.sys\n" @@ -982,7 +982,7 @@ static const char inf_text[] = "DefaultDestDir=12\n"
"[svc_section]\n" - "ServiceBinary=%12%\winetest.sys\n" + "ServiceBinary=%%12%%\winetest.sys\n" "ServiceType=1\n" "StartType=3\n" "ErrorControl=1\n" @@ -1374,6 +1374,7 @@ static void test_pnp_devices(void) static void test_pnp_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_pnp"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -1395,7 +1396,7 @@ static void test_pnp_driver(struct testsign_context *ctx)
f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f);
/* Create the catalog file. */ @@ -1472,7 +1473,7 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager); @@ -2031,6 +2032,7 @@ static void test_hid_device(void) static void test_hid_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_hid"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -2051,7 +2053,7 @@ static void test_hid_driver(struct testsign_context *ctx)
f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f);
/* Create the catalog file. */ @@ -2109,7 +2111,7 @@ static void test_hid_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92349
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages ntoskrnl.c:1253: Test failed: got 0 bus removal messages ntoskrnl.c:1278: Test failed: got 0 child arrival messages ntoskrnl.c:1285: Test failed: failed to get device, error 0x103 ntoskrnl.c:1286: Test failed: wrong class {4d36e97d-e325-11ce-bfc1-08002be10318} ntoskrnl.c:1289: Test failed: failed to get device ID, error 0x57 ntoskrnl.c:1290: Test failed: got ID "\x05" ntoskrnl.c:1294: Test failed: got error 0x57 ntoskrnl.c:1311: Test failed: got error 0x57 ntoskrnl.c:1316: Test failed: got error 0x57 ntoskrnl.c:1320: Test failed: got error 0x57 ntoskrnl.c:1321: Test failed: got type 6357104 ntoskrnl.c:1322: Test failed: got size 0 ntoskrnl.c:1327: Test failed: got error 0x57 ntoskrnl.c:1328: Test failed: got type 6357104 ntoskrnl.c:1329: Test failed: got size 0 ntoskrnl.c:1334: Test failed: got error 0x57 ntoskrnl.c:1361: Test failed: got 0 child arrival messages ntoskrnl.c:1362: Test failed: got 0 child removal messages ntoskrnl.c:1365: Test failed: got 0 ntoskrnl.c:1465: Test failed: failed to get device list, error 0xd ntoskrnl.c:294: Test failed: expected SERVICE_STOPPED, got 4 ntoskrnl.c:2092: Test failed: failed to install device, error 0x436 ntoskrnl.c:2016: Test failed: didn't find device ntoskrnl.c:2020: Test failed: got error 3 ntoskrnl.c:1733: Test failed: HidD_GetPreparsedData failed with error 6 0e14:ntoskrnl: unhandled exception c0000005 at 737C1B19
=== w864 (64 bit report) ===
Report validation errors: ntoskrnl.exe:ntoskrnl crashed (c0000374)
On 6/11/21 5:43 AM, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/ntoskrnl.exe/tests/ntoskrnl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index ff73e8eae18..90d68149c1f 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -967,7 +967,7 @@ static const char inf_text[] = "CopyFiles=file_section\n"
"[device_section.NT" EXT ".Services]\n"
- "AddService=winetest,0x2,svc_section\n"
"AddService=%s,0x2,svc_section\n"
"[file_section]\n" "winetest.sys\n"
@@ -982,7 +982,7 @@ static const char inf_text[] = "DefaultDestDir=12\n"
"[svc_section]\n"
- "ServiceBinary=%12%\winetest.sys\n"
- "ServiceBinary=%%12%%\winetest.sys\n" "ServiceType=1\n" "StartType=3\n" "ErrorControl=1\n"
@@ -1374,6 +1374,7 @@ static void test_pnp_devices(void) static void test_pnp_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0";
- static const char service_name[] = "winetest_pnp"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH];
@@ -1395,7 +1396,7 @@ static void test_pnp_driver(struct testsign_context *ctx)
f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno));
- fputs(inf_text, f);
fprintf(f, inf_text, service_name); fclose(f);
/* Create the catalog file. */
@@ -1472,7 +1473,7 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError());
- service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE);
- service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
@@ -2031,6 +2032,7 @@ static void test_hid_device(void) static void test_hid_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0";
- static const char service_name[] = "winetest_hid"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH];
@@ -2051,7 +2053,7 @@ static void test_hid_driver(struct testsign_context *ctx)
f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno));
- fputs(inf_text, f);
fprintf(f, inf_text, service_name); fclose(f);
/* Create the catalog file. */
@@ -2109,7 +2111,7 @@ static void test_hid_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError());
- service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE);
- service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
What's the motivation for this?
On 6/11/21 5:44 PM, Zebediah Figura (she/her) wrote:
On 6/11/21 5:43 AM, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/ntoskrnl.exe/tests/ntoskrnl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index ff73e8eae18..90d68149c1f 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -967,7 +967,7 @@ static const char inf_text[] = "CopyFiles=file_section\n" "[device_section.NT" EXT ".Services]\n" - "AddService=winetest,0x2,svc_section\n" + "AddService=%s,0x2,svc_section\n" "[file_section]\n" "winetest.sys\n" @@ -982,7 +982,7 @@ static const char inf_text[] = "DefaultDestDir=12\n" "[svc_section]\n" - "ServiceBinary=%12%\winetest.sys\n" + "ServiceBinary=%%12%%\winetest.sys\n" "ServiceType=1\n" "StartType=3\n" "ErrorControl=1\n" @@ -1374,6 +1374,7 @@ static void test_pnp_devices(void) static void test_pnp_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_pnp"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -1395,7 +1396,7 @@ static void test_pnp_driver(struct testsign_context *ctx) f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f); /* Create the catalog file. */ @@ -1472,7 +1473,7 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager); @@ -2031,6 +2032,7 @@ static void test_hid_device(void) static void test_hid_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_hid"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -2051,7 +2053,7 @@ static void test_hid_driver(struct testsign_context *ctx) f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f); /* Create the catalog file. */ @@ -2109,7 +2111,7 @@ static void test_hid_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
What's the motivation for this?
Be able to pass arguments to the driver somehow. It's used to run the driver two times, one without report ids and one with, with very little code duplication and with the same tests run in both case.
On 6/11/21 10:52 AM, Rémi Bernon wrote:
On 6/11/21 5:44 PM, Zebediah Figura (she/her) wrote:
On 6/11/21 5:43 AM, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
dlls/ntoskrnl.exe/tests/ntoskrnl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index ff73e8eae18..90d68149c1f 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -967,7 +967,7 @@ static const char inf_text[] = "CopyFiles=file_section\n" "[device_section.NT" EXT ".Services]\n" - "AddService=winetest,0x2,svc_section\n" + "AddService=%s,0x2,svc_section\n" "[file_section]\n" "winetest.sys\n" @@ -982,7 +982,7 @@ static const char inf_text[] = "DefaultDestDir=12\n" "[svc_section]\n" - "ServiceBinary=%12%\winetest.sys\n" + "ServiceBinary=%%12%%\winetest.sys\n" "ServiceType=1\n" "StartType=3\n" "ErrorControl=1\n" @@ -1374,6 +1374,7 @@ static void test_pnp_devices(void) static void test_pnp_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_pnp"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -1395,7 +1396,7 @@ static void test_pnp_driver(struct testsign_context *ctx) f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f); /* Create the catalog file. */ @@ -1472,7 +1473,7 @@ static void test_pnp_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager); @@ -2031,6 +2032,7 @@ static void test_hid_device(void) static void test_hid_driver(struct testsign_context *ctx) { static const char hardware_id[] = "test_hardware_id\0"; + static const char service_name[] = "winetest_hid"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -2051,7 +2053,7 @@ static void test_hid_driver(struct testsign_context *ctx) f = fopen("winetest.inf", "w"); ok(!!f, "failed to open winetest.inf: %s\n", strerror(errno)); - fputs(inf_text, f); + fprintf(f, inf_text, service_name); fclose(f); /* Create the catalog file. */ @@ -2109,7 +2111,7 @@ static void test_hid_driver(struct testsign_context *ctx) /* Windows stops the service but does not delete it. */ manager = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); ok(!!manager, "failed to open service manager, error %u\n", GetLastError()); - service = OpenServiceA(manager, "winetest", SERVICE_STOP | DELETE); + service = OpenServiceA(manager, service_name, SERVICE_STOP | DELETE); ok(!!service, "failed to open service, error %u\n", GetLastError()); unload_driver(service); CloseServiceHandle(manager);
What's the motivation for this?
Be able to pass arguments to the driver somehow. It's used to run the driver two times, one without report ids and one with, with very little code duplication and with the same tests run in both case.
Okay, I guess that makes sense. It's not the most intuitive way to pass that data (I guess that'd be via registry values), and it'd also be nice if we could just use a separate TLC instead of having to run the driver twice, but of course we don't have support for multiple TLCs yet...
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver_hid.c | 97 ++++++++++++++++------------ dlls/ntoskrnl.exe/tests/ntoskrnl.c | 54 ++++++++++++---- 2 files changed, 97 insertions(+), 54 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 1fe644250f7..7260adeb172 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -40,6 +40,7 @@ static UNICODE_STRING control_symlink;
static unsigned int got_start_device; +static unsigned int report_id;
static NTSTATUS WINAPI driver_pnp(DEVICE_OBJECT *device, IRP *irp) { @@ -85,49 +86,54 @@ static NTSTATUS WINAPI driver_power(DEVICE_OBJECT *device, IRP *irp) return PoCallDriver(ext->NextDeviceObject, irp); }
-#include "psh_hid_macros.h" - -static const unsigned char report_descriptor[] = +static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) { - USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_JOYSTICK), - COLLECTION(1, Application), - USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_X), - USAGE(1, HID_USAGE_GENERIC_Y), - LOGICAL_MINIMUM(1, -128), - LOGICAL_MAXIMUM(1, 127), - REPORT_SIZE(1, 8), - REPORT_COUNT(1, 2), - INPUT(1, Data|Var|Abs), - - USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), - USAGE_MINIMUM(1, 1), - USAGE_MAXIMUM(1, 8), - LOGICAL_MINIMUM(1, 0), - LOGICAL_MAXIMUM(1, 1), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 1), - REPORT_COUNT(1, 8), - REPORT_SIZE(1, 1), - INPUT(1, Data|Var|Abs), - +#include "psh_hid_macros.h" +/* Replace REPORT_ID with USAGE_PAGE when id is 0 */ +#define REPORT_ID_OR_USAGE_PAGE(size, id) SHORT_ITEM_1((id ? 8 : 0), 1, id) + const unsigned char report_descriptor[] = + { USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), - USAGE(1, HID_USAGE_GENERIC_HATSWITCH), - LOGICAL_MINIMUM(1, 1), - LOGICAL_MAXIMUM(1, 8), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 8), - REPORT_SIZE(1, 4), - REPORT_COUNT(1, 2), - INPUT(1, Data|Var|Abs), - END_COLLECTION, -}; - + USAGE(1, HID_USAGE_GENERIC_JOYSTICK), + COLLECTION(1, Application), + USAGE(1, HID_USAGE_GENERIC_JOYSTICK), + COLLECTION(1, Logical), + REPORT_ID_OR_USAGE_PAGE(1, report_id), + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_X), + USAGE(1, HID_USAGE_GENERIC_Y), + LOGICAL_MINIMUM(1, -128), + LOGICAL_MAXIMUM(1, 127), + REPORT_SIZE(1, 8), + REPORT_COUNT(1, 2), + INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), + USAGE_MINIMUM(1, 1), + USAGE_MAXIMUM(1, 8), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_HATSWITCH), + LOGICAL_MINIMUM(1, 1), + LOGICAL_MAXIMUM(1, 8), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 8), + REPORT_SIZE(1, 4), + REPORT_COUNT(1, 2), + INPUT(1, Data|Var|Abs), + END_COLLECTION, + END_COLLECTION, + }; +#undef REPORT_ID_OR_USAGE_PAGE #include "pop_hid_macros.h"
-static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) -{ static BOOL test_failed; IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation(irp); const ULONG in_size = stack->Parameters.DeviceIoControl.InputBufferLength; @@ -202,9 +208,13 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_READ_REPORT: { - ULONG expected_size = 4; + ULONG expected_size = report_id ? 5 : 4; ok(!in_size, "got input size %u\n", in_size); - if (!test_failed) todo_wine ok(out_size == expected_size, "got output size %u\n", out_size); + if (!test_failed) + { + todo_wine_if(!report_id) + ok(out_size == expected_size, "got output size %u\n", out_size); + } if (out_size != expected_size) test_failed = TRUE;
ret = STATUS_NOT_IMPLEMENTED; @@ -284,11 +294,16 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, UNICODE_STRING *registry) .DriverObject = driver, .RegistryPath = registry, }; + WCHAR buffer[MAX_PATH]; NTSTATUS ret;
if ((ret = winetest_init())) return ret;
+ memset(buffer, 0, sizeof(buffer)); + lstrcpynW(buffer, registry->Buffer, min(MAX_PATH, registry->Length / sizeof(WCHAR) + 1)); + if (wcsstr(buffer, L"winetest_hid_report_id")) report_id = 1; + driver->DriverExtension->AddDevice = driver_add_device; driver->DriverUnload = driver_unload; driver->MajorFunction[IRP_MJ_PNP] = driver_pnp; diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 90d68149c1f..6afc07ef62e 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1639,25 +1639,27 @@ static inline void check_hidp_value_caps_(int line, HIDP_VALUE_CAPS *caps, const } }
-static void test_hidp(HANDLE file) +static void test_hidp(HANDLE file, int report_id) { - static const HIDP_CAPS expect_hidp_caps = + const HIDP_CAPS expect_hidp_caps = { .Usage = HID_USAGE_GENERIC_JOYSTICK, .UsagePage = HID_USAGE_PAGE_GENERIC, .InputReportByteLength = 5, - .NumberLinkCollectionNodes = 1, + .NumberLinkCollectionNodes = 2, .NumberInputButtonCaps = 1, .NumberInputValueCaps = 3, .NumberInputDataIndices = 11, }; - static const HIDP_BUTTON_CAPS expect_button_caps[] = + const HIDP_BUTTON_CAPS expect_button_caps[] = { { .UsagePage = HID_USAGE_PAGE_BUTTON, + .ReportID = report_id, .BitField = 2, .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .LinkCollection = 1, .IsRange = TRUE, .IsAbsolute = TRUE, .Range.UsageMin = 1, @@ -1666,13 +1668,15 @@ static void test_hidp(HANDLE file) .Range.DataIndexMax = 9, }, }; - static const HIDP_VALUE_CAPS expect_value_caps[] = + const HIDP_VALUE_CAPS expect_value_caps[] = { { .UsagePage = HID_USAGE_PAGE_GENERIC, + .ReportID = report_id, .BitField = 2, .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .LinkCollection = 1, .IsAbsolute = TRUE, .BitSize = 8, .ReportCount = 1, @@ -1682,9 +1686,11 @@ static void test_hidp(HANDLE file) }, { .UsagePage = HID_USAGE_PAGE_GENERIC, + .ReportID = report_id, .BitField = 2, .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .LinkCollection = 1, .IsAbsolute = TRUE, .BitSize = 8, .ReportCount = 1, @@ -1695,9 +1701,11 @@ static void test_hidp(HANDLE file) }, { .UsagePage = HID_USAGE_PAGE_GENERIC, + .ReportID = report_id, .BitField = 2, .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .LinkCollection = 1, .IsAbsolute = TRUE, .BitSize = 4, .ReportCount = 2, @@ -1714,6 +1722,13 @@ static void test_hidp(HANDLE file) .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, .CollectionType = 1, + .NumberOfChildren = 1, + .FirstChild = 1, + }, + { + .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, + .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .CollectionType = 2, }, };
@@ -1961,34 +1976,45 @@ static void test_hidp(HANDLE file) ok(status == HIDP_STATUS_INVALID_REPORT_LENGTH, "HidP_InitializeReportForID returned %#x\n", status); status = HidP_InitializeReportForID(HidP_Input, 0, preparsed_data, report, caps.InputReportByteLength + 1); ok(status == HIDP_STATUS_INVALID_REPORT_LENGTH, "HidP_InitializeReportForID returned %#x\n", status); + status = HidP_InitializeReportForID(HidP_Input, 1 - report_id, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(!report_id) + ok(status == HIDP_STATUS_REPORT_DOES_NOT_EXIST, "HidP_InitializeReportForID returned %#x\n", status);
memset(report, 0xcd, sizeof(report)); - status = HidP_InitializeReportForID(HidP_Input, 0, preparsed_data, report, caps.InputReportByteLength); + status = HidP_InitializeReportForID(HidP_Input, report_id, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) ok(status == HIDP_STATUS_SUCCESS, "HidP_InitializeReportForID returned %#x\n", status);
memset(buffer, 0xcd, sizeof(buffer)); memset(buffer, 0, caps.InputReportByteLength); + buffer[0] = report_id; + todo_wine_if(report_id) ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n");
HidD_FreePreparsedData(preparsed_data); CloseHandle(file); }
-static void test_hid_device(void) +static void test_hid_device(char const *service_name) { char buffer[200]; SP_DEVICE_INTERFACE_DETAIL_DATA_A *iface_detail = (void *)buffer; SP_DEVICE_INTERFACE_DATA iface = {sizeof(iface)}; SP_DEVINFO_DATA device = {sizeof(device)}; + unsigned int i, report_id; BOOL ret, found = FALSE; OBJECT_ATTRIBUTES attr; UNICODE_STRING string; IO_STATUS_BLOCK io; NTSTATUS status; - unsigned int i; HDEVINFO set; HANDLE file;
+ if (!strcmp(service_name, "winetest_hid_report_ids")) report_id = 1; + else report_id = 0; + + winetest_push_context("report %d", report_id); + set = SetupDiGetClassDevsA(&GUID_DEVINTERFACE_HID, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); ok(set != INVALID_HANDLE_VALUE, "failed to get device list, error %#x\n", GetLastError());
@@ -2019,7 +2045,7 @@ static void test_hid_device(void) FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError());
- test_hidp(file); + test_hidp(file, report_id);
CloseHandle(file);
@@ -2027,12 +2053,13 @@ static void test_hid_device(void) InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, NULL, NULL); status = NtOpenFile(&file, SYNCHRONIZE, &attr, &io, 0, FILE_SYNCHRONOUS_IO_NONALERT); todo_wine ok(status == STATUS_UNSUCCESSFUL, "got %#x\n", status); + + winetest_pop_context(); }
-static void test_hid_driver(struct testsign_context *ctx) +static void test_hid_driver(struct testsign_context *ctx, char const *service_name) { static const char hardware_id[] = "test_hardware_id\0"; - static const char service_name[] = "winetest_hid"; char path[MAX_PATH], dest[MAX_PATH], *filepart; SP_DEVINFO_DATA device = {sizeof(device)}; char cwd[MAX_PATH], tempdir[MAX_PATH]; @@ -2094,7 +2121,7 @@ static void test_hid_driver(struct testsign_context *ctx)
/* Tests. */
- test_hid_device(); + test_hid_device(service_name);
/* Clean up. */
@@ -2225,7 +2252,8 @@ START_TEST(ntoskrnl) test_pnp_driver(&ctx);
subtest("driver_hid"); - test_hid_driver(&ctx); + test_hid_driver(&ctx, "winetest_hid"); + test_hid_driver(&ctx, "winetest_hid_report_ids");
out: testsign_cleanup(&ctx);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92350
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages ntoskrnl.c:1253: Test failed: got 0 bus removal messages ntoskrnl.c:1278: Test failed: got 0 child arrival messages ntoskrnl.c:1285: Test failed: failed to get device, error 0x103 ntoskrnl.c:1286: Test failed: wrong class {4d36e97d-e325-11ce-bfc1-08002be10318} ntoskrnl.c:1289: Test failed: failed to get device ID, error 0x57 ntoskrnl.c:1290: Test failed: got ID "\x05" ntoskrnl.c:1294: Test failed: got error 0x57 ntoskrnl.c:1311: Test failed: got error 0x57 ntoskrnl.c:1316: Test failed: got error 0x57 ntoskrnl.c:1320: Test failed: got error 0x57 ntoskrnl.c:1321: Test failed: got type 6357104 ntoskrnl.c:1322: Test failed: got size 0 ntoskrnl.c:1327: Test failed: got error 0x57 ntoskrnl.c:1328: Test failed: got type 6357104 ntoskrnl.c:1329: Test failed: got size 0 ntoskrnl.c:1334: Test failed: got error 0x57 ntoskrnl.c:1361: Test failed: got 0 child arrival messages ntoskrnl.c:1362: Test failed: got 0 child removal messages ntoskrnl.c:1365: Test failed: got 0 ntoskrnl.c:1465: Test failed: failed to get device list, error 0xd ntoskrnl.c:294: Test failed: expected SERVICE_STOPPED, got 4 ntoskrnl.c:2119: Test failed: failed to install device, error 0x436 ntoskrnl.c:2042: Test failed: report 0: didn't find device ntoskrnl.c:2046: Test failed: report 0: got error 123 ntoskrnl.c:1748: Test failed: report 0: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1754: Test failed: report 0: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1755: Test failed: report 0: got Usage 0000, expected 0004 ntoskrnl.c:1755: Test failed: report 0: got UsagePage 002b, expected 0001 ntoskrnl.c:1755: Test failed: report 0: got InputReportByteLength 63896, expected 5 ntoskrnl.c:1755: Test failed: report 0: got OutputReportByteLength 48, expected 0 ntoskrnl.c:1755: Test failed: report 0: got FeatureReportByteLength 336, expected 0 ntoskrnl.c:1755: Test failed: report 0: got NumberLinkCollectionNodes 0, expected 2 ntoskrnl.c:1755: Test failed: report 0: got NumberInputButtonCaps 43, expected 1 ntoskrnl.c:1755: Test failed: report 0: got NumberInputValueCaps 336, expected 3 ntoskrnl.c:1755: Test failed: report 0: got NumberInputDataIndices 43, expected 11 ntoskrnl.c:1755: Test failed: report 0: got NumberOutputDataIndices 118, expected 0 ntoskrnl.c:1755: Test failed: report 0: got NumberFeatureValueCaps 336, expected 0 ntoskrnl.c:1755: Test failed: report 0: got NumberFeatureDataIndices 43, expected 0 ntoskrnl.c:1759: Test failed: report 0: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1767: Test failed: report 0: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1768: Test failed: report 0: got 16 collection nodes, expected 0 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got LinkUsage 77d5, expected 0004 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got LinkUsagePage 756e, expected 0001 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got Parent 99, expected 0 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got NumberOfChildren 0, expected 1 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got NextSibling 63371, expected 0 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got FirstChild 30063, expected 1 ntoskrnl.c:1774: Test failed: report 0: collections[0]: got CollectionType 48, expected 1 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got Parent 64188, expected 0 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got NumberOfChildren 48, expected 0 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got CollectionType 152, expected 2 ntoskrnl.c:1774: Test failed: report 0: collections[1]: got IsAlias 1, expected 0 ntoskrnl.c:1781: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1783: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1787: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1789: Test failed: report 0: HidP_GetButtonCaps returned count 0, expected 43 ntoskrnl.c:1795: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1796: Test failed: report 0: HidP_GetButtonCaps returned count 16, expected 43 ntoskrnl.c:1802: Test failed: report 0: button_caps[0]: got UsagePage 0001, expected 0009 ntoskrnl.c:1806: Test failed: report 0: button_caps[0]: got BitField 61460, expected 2 ntoskrnl.c:1807: Test failed: report 0: button_caps[0]: got LinkCollection 34, expected 1 ntoskrnl.c:1808: Test failed: report 0: button_caps[0]: got LinkUsage 0002, expected 0004 ntoskrnl.c:1809: Test failed: report 0: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1810: Test failed: report 0: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1813: Test failed: report 0: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1814: Test failed: report 0: button_caps[0]: got Range.UsageMin 0000, expected 0001 ntoskrnl.c:1815: Test failed: report 0: button_caps[0]: got Range.UsageMax 0000, expected 0008 ntoskrnl.c:1820: Test failed: report 0: button_caps[0]: got Range.DataIndexMin 0, expected 2 ntoskrnl.c:1821: Test failed: report 0: button_caps[0]: got Range.DataIndexMax 0, expected 9 ntoskrnl.c:1828: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1830: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1834: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1836: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 0, expected 43 ntoskrnl.c:1843: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1844: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 15, expected 43 ntoskrnl.c:1846: Test failed: report 0: got UsagePage 0000, expected 0001 ntoskrnl.c:1846: Test failed: report 0: got BitField 0, expected 61460 ntoskrnl.c:1846: Test failed: report 0: got LinkCollection 0, expected 34 ntoskrnl.c:1846: Test failed: report 0: got LinkUsage 0000, expected 0002 ntoskrnl.c:1846: Test failed: report 0: got NotRange.Usage 0011, expected 0000 ntoskrnl.c:1846: Test failed: report 0: got NotRange.DataIndex 54000, expected 0 ntoskrnl.c:1846: Test failed: report 0: got NotRange.DesignatorIndex 56576, expected 0 ntoskrnl.c:1850: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1851: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1852: Test failed: report 0: got UsagePage 0000, expected 0001 ntoskrnl.c:1852: Test failed: report 0: got BitField 0, expected 61460 ntoskrnl.c:1852: Test failed: report 0: got LinkCollection 0, expected 34 ntoskrnl.c:1852: Test failed: report 0: got LinkUsage 0000, expected 0002 ntoskrnl.c:1852: Test failed: report 0: got NotRange.Usage 0011, expected 0000 ntoskrnl.c:1852: Test failed: report 0: got NotRange.DataIndex 54000, expected 0 ntoskrnl.c:1852: Test failed: report 0: got NotRange.DesignatorIndex 56576, expected 0 ntoskrnl.c:1857: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1858: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1862: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1863: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1867: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1868: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1873: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1875: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1879: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1881: Test failed: report 0: HidP_GetValueCaps returned count 0, expected 336 ntoskrnl.c:1887: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:1888: Test failed: report 0: HidP_GetValueCaps returned count 16, expected 336 ntoskrnl.c:1894: Test failed: report 0: value_caps[0]: got UsagePage 0000, expected 0001 ntoskrnl.c:1895: Test failed: report 0: value_caps[0]: got ReportID 43, expected 0 ntoskrnl.c:1898: Test failed: report 0: value_caps[0]: got BitField 56016, expected 2 ntoskrnl.c:1899: Test failed: report 0: value_caps[0]: got LinkCollection 50, expected 1 ntoskrnl.c:1900: Test failed: report 0: value_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1901: Test failed: report 0: value_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1902: Test failed: report 0: value_caps[0]: got IsRange 49, expected 0 ntoskrnl.c:1905: Test failed: report 0: value_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1906: Test failed: report 0: value_caps[0]: got HasNull 172, expected 0 ntoskrnl.c:1907: Test failed: report 0: value_caps[0]: got BitSize 34, expected 8 ntoskrnl.c:1908: Test failed: report 0: value_caps[0]: got ReportCount 69, expected 1 ntoskrnl.c:1909: Test failed: report 0: value_caps[0]: got UnitsExp 2289580, expected 0 ntoskrnl.c:1910: Test failed: report 0: value_caps[0]: got Units 2003196804, expected 0 ntoskrnl.c:1911: Test failed: report 0: value_caps[0]: got LogicalMin 2003196851, expected -128 ntoskrnl.c:1912: Test failed: report 0: value_caps[0]: got LogicalMax 2001509086, expected 127 ntoskrnl.c:1914: Test failed: report 0: value_caps[0]: got PhysicalMax 2818988, expected 0 ntoskrnl.c:1916: Test failed: report 0: value_caps[0]: got NotRange.Usage 0000, expected 0031 ntoskrnl.c:1917: Test failed: report 0: value_caps[0]: got NotRange.StringIndex 336, expected 0 ntoskrnl.c:1918: Test failed: report 0: value_caps[0]: got NotRange.DesignatorIndex 17, expected 0 ntoskrnl.c:1919: Test failed: report 0: value_caps[0]: got NotRange.DataIndex 27136, expected 0 ntoskrnl.c:1894: Test failed: report 0: value_caps[1]: got UsagePage 0150, expected 0001 ntoskrnl.c:1895: Test failed: report 0: value_caps[1]: got ReportID 43, expected 0 ntoskrnl.c:1898: Test failed: report 0: value_caps[1]: got BitField 86, expected 2 ntoskrnl.c:1899: Test failed: report 0: value_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1900: Test failed: report 0: value_caps[1]: got LinkUsage 0180, expected 0004 ntoskrnl.c:1901: Test failed: report 0: value_caps[1]: got LinkUsagePage 002b, expected 0001 ntoskrnl.c:1905: Test failed: report 0: value_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1906: Test failed: report 0: value_caps[1]: got HasNull 49, expected 0 ntoskrnl.c:1907: Test failed: report 0: value_caps[1]: got BitSize 0, expected 8 ntoskrnl.c:1908: Test failed: report 0: value_caps[1]: got ReportCount 27136, expected 1 ntoskrnl.c:1909: Test failed: report 0: value_caps[1]: got UnitsExp 3724896, expected 0 ntoskrnl.c:1911: Test failed: report 0: value_caps[1]: got LogicalMin 118, expected -128 ntoskrnl.c:1912: Test failed: report 0: value_caps[1]: got LogicalMax 0, expected 127 ntoskrnl.c:1913: Test failed: report 0: value_caps[1]: got PhysicalMin 69, expected 0 ntoskrnl.c:1914: Test failed: report 0: value_caps[1]: got PhysicalMax 3209624, expected 0 ntoskrnl.c:1916: Test failed: report 0: value_caps[1]: got NotRange.Usage 0076, expected 0030 ntoskrnl.c:1917: Test failed: report 0: value_caps[1]: got NotRange.StringIndex 61288, expected 0 ntoskrnl.c:1918: Test failed: report 0: value_caps[1]: got NotRange.DesignatorIndex 62247, expected 0 ntoskrnl.c:1919: Test failed: report 0: value_caps[1]: got NotRange.DataIndex 0, expected 1 ntoskrnl.c:1894: Test failed: report 0: value_caps[2]: got UsagePage 0002, expected 0001 ntoskrnl.c:1896: Test failed: report 0: value_caps[2]: got IsAlias 2, expected 0 ntoskrnl.c:1898: Test failed: report 0: value_caps[2]: got BitField 63896, expected 2 ntoskrnl.c:1899: Test failed: report 0: value_caps[2]: got LinkCollection 48, expected 1 ntoskrnl.c:1900: Test failed: report 0: value_caps[2]: got LinkUsage 0077, expected 0004 ntoskrnl.c:1901: Test failed: report 0: value_caps[2]: got LinkUsagePage 7700, expected 0001 ntoskrnl.c:1902: Test failed: report 0: value_caps[2]: got IsRange 104, expected 0 ntoskrnl.c:1903: Test failed: report 0: value_caps[2]: got IsStringRange 239, expected 0 ntoskrnl.c:1904: Test failed: report 0: value_caps[2]: got IsDesignatorRange 34, expected 0 ntoskrnl.c:1905: Test failed: report 0: value_caps[2]: got IsAbsolute 0, expected 1 ntoskrnl.c:1906: Test failed: report 0: value_caps[2]: got HasNull 36, expected 0 ntoskrnl.c:1907: Test failed: report 0: value_caps[2]: got BitSize 0, expected 4 ntoskrnl.c:1908: Test failed: report 0: value_caps[2]: got ReportCount 2580, expected 2 ntoskrnl.c:1909: Test failed: report 0: value_caps[2]: got UnitsExp 2, expected 0 ntoskrnl.c:1910: Test failed: report 0: value_caps[2]: got Units 36, expected 0 ntoskrnl.c:1911: Test failed: report 0: value_caps[2]: got LogicalMin 4065812, expected 1 ntoskrnl.c:1912: Test failed: report 0: value_caps[2]: got LogicalMax 1974661775, expected 8 ntoskrnl.c:1913: Test failed: report 0: value_caps[2]: got PhysicalMin -1412087973, expected 0 ntoskrnl.c:1914: Test failed: report 0: value_caps[2]: got PhysicalMax 0, expected 8 ntoskrnl.c:1916: Test failed: report 0: value_caps[2]: got NotRange.Usage efb0, expected 0039 ntoskrnl.c:1917: Test failed: report 0: value_caps[2]: got NotRange.StringIndex 62087, expected 0 ntoskrnl.c:1918: Test failed: report 0: value_caps[2]: got NotRange.DesignatorIndex 62095, expected 0 ntoskrnl.c:1919: Test failed: report 0: value_caps[2]: got NotRange.DataIndex 16247, expected 10 ntoskrnl.c:1926: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1928: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1932: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1934: Test failed: report 0: HidP_GetSpecificValueCaps returned count 0, expected 336 ntoskrnl.c:1941: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1942: Test failed: report 0: HidP_GetSpecificValueCaps returned count 13, expected 336 ntoskrnl.c:1944: Test failed: report 0: got ReportID 0, expected 43 ntoskrnl.c:1944: Test failed: report 0: got BitField 36, expected 56016 ntoskrnl.c:1944: Test failed: report 0: got LinkCollection 0, expected 50 ntoskrnl.c:1944: Test failed: report 0: got LinkUsage 1280, expected 0 ntoskrnl.c:1944: Test failed: report 0: got LinkUsagePage 30140, expected 0 ntoskrnl.c:1944: Test failed: report 0: got IsRange 0, expected 49 ntoskrnl.c:1944: Test failed: report 0: got HasNull 0, expected 172 ntoskrnl.c:1944: Test failed: report 0: got BitSize 30140, expected 34 ntoskrnl.c:1944: Test failed: report 0: got ReportCount 36, expected 69 ntoskrnl.c:1944: Test failed: report 0: got UnitsExp 4065824, expected 2289580 ntoskrnl.c:1944: Test failed: report 0: got Units 2289644, expected 2003196804 ntoskrnl.c:1944: Test failed: report 0: got LogicalMin 1974681905, expected 2003196851 ntoskrnl.c:1944: Test failed: report 0: got LogicalMax 1, expected 2001509086 ntoskrnl.c:1944: Test failed: report 0: got PhysicalMin 1974681861, expected 0 ntoskrnl.c:1944: Test failed: report 0: got PhysicalMax -1412088021, expected 2818988 ntoskrnl.c:1944: Test failed: report 0: got NotRange.DesignatorIndex 0, expected 17 ntoskrnl.c:1945: Test failed: report 0: got UsagePage 0001, expected 0150 ntoskrnl.c:1945: Test failed: report 0: got ReportID 0, expected 43 ntoskrnl.c:1945: Test failed: report 0: got BitField 61372, expected 86 ntoskrnl.c:1945: Test failed: report 0: got LinkCollection 34, expected 0 ntoskrnl.c:1945: Test failed: report 0: got LinkUsage 16645, expected 384 ntoskrnl.c:1945: Test failed: report 0: got LinkUsagePage 30131, expected 43 ntoskrnl.c:1945: Test failed: report 0: got IsRange 224, expected 0 ntoskrnl.c:1945: Test failed: report 0: got IsStringRange 242, expected 0 ntoskrnl.c:1945: Test failed: report 0: got IsDesignatorRange 34, expected 0 ntoskrnl.c:1945: Test failed: report 0: got HasNull 213, expected 49 ntoskrnl.c:1945: Test failed: report 0: got BitSize 30132, expected 0 ntoskrnl.c:1945: Test failed: report 0: got ReportCount 37327, expected 27136 ntoskrnl.c:1945: Test failed: report 0: got UnitsExp 1974696146, expected 3724896 ntoskrnl.c:1945: Test failed: report 0: got Units 1, expected 0 ntoskrnl.c:1945: Test failed: report 0: got LogicalMin 2289684, expected 118 ntoskrnl.c:1945: Test failed: report 0: got LogicalMax 1, expected 0 ntoskrnl.c:1945: Test failed: report 0: got PhysicalMin 2290488, expected 69 ntoskrnl.c:1945: Test failed: report 0: got PhysicalMax 1975265568, expected 3209624 ntoskrnl.c:1946: Test failed: report 0: got UsagePage 0001, expected 0002 ntoskrnl.c:1946: Test failed: report 0: got IsAlias 0, expected 2 ntoskrnl.c:1946: Test failed: report 0: got BitField 53874, expected 63896 ntoskrnl.c:1946: Test failed: report 0: got LinkCollection 30130, expected 48 ntoskrnl.c:1946: Test failed: report 0: got LinkUsage 0, expected 119 ntoskrnl.c:1946: Test failed: report 0: got LinkUsagePage 0, expected 30464 ntoskrnl.c:1946: Test failed: report 0: got IsRange 32, expected 104 ntoskrnl.c:1946: Test failed: report 0: got IsStringRange 41, expected 239 ntoskrnl.c:1946: Test failed: report 0: got IsDesignatorRange 188, expected 34 ntoskrnl.c:1946: Test failed: report 0: got IsAbsolute 117, expected 0 ntoskrnl.c:1946: Test failed: report 0: got HasNull 24, expected 36 ntoskrnl.c:1946: Test failed: report 0: got BitSize 30130, expected 0 ntoskrnl.c:1946: Test failed: report 0: got ReportCount 51253, expected 2580 ntoskrnl.c:1946: Test failed: report 0: got UnitsExp 1974653554, expected 2 ntoskrnl.c:1946: Test failed: report 0: got Units 0, expected 36 ntoskrnl.c:1946: Test failed: report 0: got LogicalMin 1975265568, expected 4065812 ntoskrnl.c:1946: Test failed: report 0: got LogicalMax 0, expected 1974661775 ntoskrnl.c:1946: Test failed: report 0: got PhysicalMin 1975265568, expected -1412087973 ntoskrnl.c:1946: Test failed: report 0: got Range.UsageMin 0000, expected efb0 ntoskrnl.c:1946: Test failed: report 0: got Range.UsageMax 0000, expected 0022 ntoskrnl.c:1946: Test failed: report 0: got Range.DataIndexMin 4800, expected 16247 ntoskrnl.c:1946: Test failed: report 0: got Range.DataIndexMax 62, expected 43989 ntoskrnl.c:1946: Test failed: report 0: got Range.StringMin 0, expected 62087 ntoskrnl.c:1946: Test failed: report 0: got Range.StringMax 0, expected 30130 ntoskrnl.c:1946: Test failed: report 0: got Range.DesignatorMin 11216, expected 62095 ntoskrnl.c:1946: Test failed: report 0: got Range.DesignatorMax 30140, expected 30130 ntoskrnl.c:1951: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1953: Test failed: report 0: got UsagePage 0000, expected 0002 ntoskrnl.c:1953: Test failed: report 0: got IsAlias 0, expected 2 ntoskrnl.c:1953: Test failed: report 0: got BitField 36, expected 63896 ntoskrnl.c:1953: Test failed: report 0: got LinkCollection 0, expected 48 ntoskrnl.c:1953: Test failed: report 0: got LinkUsage 1280, expected 119 ntoskrnl.c:1953: Test failed: report 0: got LinkUsagePage 30140, expected 30464 ntoskrnl.c:1953: Test failed: report 0: got IsRange 0, expected 104 ntoskrnl.c:1953: Test failed: report 0: got IsStringRange 0, expected 239 ntoskrnl.c:1953: Test failed: report 0: got IsDesignatorRange 0, expected 34 ntoskrnl.c:1953: Test failed: report 0: got HasNull 0, expected 36 ntoskrnl.c:1953: Test failed: report 0: got BitSize 30140, expected 0 ntoskrnl.c:1953: Test failed: report 0: got ReportCount 36, expected 2580 ntoskrnl.c:1953: Test failed: report 0: got UnitsExp 4065824, expected 2 ntoskrnl.c:1953: Test failed: report 0: got Units 2289644, expected 36 ntoskrnl.c:1953: Test failed: report 0: got LogicalMin 1974681905, expected 4065812 ntoskrnl.c:1953: Test failed: report 0: got LogicalMax 1, expected 1974661775 ntoskrnl.c:1953: Test failed: report 0: got PhysicalMin 1974681861, expected -1412087973 ntoskrnl.c:1953: Test failed: report 0: got PhysicalMax -1412088021, expected 0 ntoskrnl.c:1958: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1959: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:1963: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1964: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:1968: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:1969: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:1974: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:1976: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:1978: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:1981: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:1986: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001
Report validation errors: ntoskrnl.exe:ntoskrnl crashed (c0000005)
=== w864 (64 bit report) ===
Report validation errors: ntoskrnl.exe:ntoskrnl crashed (c0000374)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver_hid.c | 124 +++++++++++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 246 ++++++++++++++++++++--- dlls/ntoskrnl.exe/tests/psh_hid_macros.h | 4 +- dlls/winebus.sys/psh_hid_macros.h | 4 +- 4 files changed, 339 insertions(+), 39 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 7260adeb172..6a5aeb05fbd 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -90,7 +90,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) { #include "psh_hid_macros.h" /* Replace REPORT_ID with USAGE_PAGE when id is 0 */ -#define REPORT_ID_OR_USAGE_PAGE(size, id) SHORT_ITEM_1((id ? 8 : 0), 1, id) +#define REPORT_ID_OR_USAGE_PAGE(size, id, off) SHORT_ITEM_1((id ? 8 : 0), 1, (id + off)) const unsigned char report_descriptor[] = { USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), @@ -98,7 +98,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) COLLECTION(1, Application), USAGE(1, HID_USAGE_GENERIC_JOYSTICK), COLLECTION(1, Logical), - REPORT_ID_OR_USAGE_PAGE(1, report_id), + REPORT_ID_OR_USAGE_PAGE(1, report_id, 0), USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), USAGE(1, HID_USAGE_GENERIC_X), USAGE(1, HID_USAGE_GENERIC_Y), @@ -113,22 +113,132 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) USAGE_MAXIMUM(1, 8), LOGICAL_MINIMUM(1, 0), LOGICAL_MAXIMUM(1, 1), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 1), REPORT_COUNT(1, 8), REPORT_SIZE(1, 1), INPUT(1, Data|Var|Abs),
+ USAGE_MINIMUM(1, 0x18), + USAGE_MAXIMUM(1, 0x1f), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Cnst|Var|Abs), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Cnst|Var|Abs), + /* needs to be 8 bit aligned as next has Buff */ + + USAGE_MINIMUM(4, (HID_USAGE_PAGE_KEYBOARD<<16)|0x8), + USAGE_MAXIMUM(4, (HID_USAGE_PAGE_KEYBOARD<<16)|0xf), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 8), + REPORT_COUNT(1, 2), + REPORT_SIZE(1, 8), + INPUT(2, Data|Ary|Rel|Wrap|Lin|Pref|Null|Vol|Buff), + + /* needs to be 8 bit aligned as previous has Buff */ + USAGE(1, 0x20), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + USAGE_MINIMUM(1, 0x21), + USAGE_MAXIMUM(1, 0x22), + REPORT_COUNT(1, 2), + REPORT_SIZE(1, 0), + INPUT(1, Data|Var|Abs), + USAGE(1, 0x23), + REPORT_COUNT(1, 0), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), USAGE(1, HID_USAGE_GENERIC_HATSWITCH), LOGICAL_MINIMUM(1, 1), LOGICAL_MAXIMUM(1, 8), - PHYSICAL_MINIMUM(1, 0), - PHYSICAL_MAXIMUM(1, 8), REPORT_SIZE(1, 4), REPORT_COUNT(1, 2), INPUT(1, Data|Var|Abs), END_COLLECTION, + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_JOYSTICK), + COLLECTION(1, Report), + REPORT_ID_OR_USAGE_PAGE(1, report_id, 1), + USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), + USAGE_MINIMUM(1, 9), + USAGE_MAXIMUM(1, 10), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + END_COLLECTION, + + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), + USAGE(1, HID_USAGE_HAPTICS_SIMPLE_CONTROLLER), + COLLECTION(1, Logical), + REPORT_ID_OR_USAGE_PAGE(1, report_id, 0), + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), + + USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_LIST), + COLLECTION(1, NamedArray), + USAGE_PAGE(1, HID_USAGE_PAGE_ORDINAL), + USAGE(1, 3), /* HID_USAGE_HAPTICS_WAVEFORM_RUMBLE */ + USAGE(1, 4), /* HID_USAGE_HAPTICS_WAVEFORM_BUZZ */ + LOGICAL_MINIMUM(2, 0x0000), + LOGICAL_MAXIMUM(2, 0xffff), + REPORT_COUNT(1, 2), + REPORT_SIZE(1, 16), + FEATURE(1, Data|Var|Abs|Null), + END_COLLECTION, + + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), + USAGE(1, HID_USAGE_HAPTICS_DURATION_LIST), + COLLECTION(1, NamedArray), + USAGE_PAGE(1, HID_USAGE_PAGE_ORDINAL), + USAGE(1, 3), /* 0 (HID_USAGE_HAPTICS_WAVEFORM_RUMBLE) */ + USAGE(1, 4), /* 0 (HID_USAGE_HAPTICS_WAVEFORM_BUZZ) */ + LOGICAL_MINIMUM(2, 0x0000), + LOGICAL_MAXIMUM(2, 0xffff), + REPORT_COUNT(1, 2), + REPORT_SIZE(1, 16), + FEATURE(1, Data|Var|Abs|Null), + END_COLLECTION, + + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), + USAGE(1, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME), + UNIT(2, 0x1001), /* seconds */ + UNIT_EXPONENT(1, -3), /* 10^-3 */ + LOGICAL_MINIMUM(2, 0x8000), + LOGICAL_MAXIMUM(2, 0x7fff), + PHYSICAL_MINIMUM(4, 0x00000000), + PHYSICAL_MAXIMUM(4, 0xffffffff), + REPORT_SIZE(1, 32), + REPORT_COUNT(1, 1), + FEATURE(1, Data|Var|Abs), + /* reset global items */ + UNIT(1, 0), /* None */ + UNIT_EXPONENT(1, 0), + END_COLLECTION, + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_JOYSTICK), + COLLECTION(1, Report), + REPORT_ID_OR_USAGE_PAGE(1, report_id, 1), + USAGE_PAGE(1, HID_USAGE_PAGE_BUTTON), + USAGE_MINIMUM(1, 9), + USAGE_MAXIMUM(1, 10), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + FEATURE(1, Data|Var|Abs), + END_COLLECTION, END_COLLECTION, }; #undef REPORT_ID_OR_USAGE_PAGE @@ -208,7 +318,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_READ_REPORT: { - ULONG expected_size = report_id ? 5 : 4; + ULONG expected_size = 10; ok(!in_size, "got input size %u\n", in_size); if (!test_failed) { diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 6afc07ef62e..c1427258971 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1641,15 +1641,36 @@ static inline void check_hidp_value_caps_(int line, HIDP_VALUE_CAPS *caps, const
static void test_hidp(HANDLE file, int report_id) { - const HIDP_CAPS expect_hidp_caps = + const HIDP_CAPS expect_hidp_caps[] = { - .Usage = HID_USAGE_GENERIC_JOYSTICK, - .UsagePage = HID_USAGE_PAGE_GENERIC, - .InputReportByteLength = 5, - .NumberLinkCollectionNodes = 2, - .NumberInputButtonCaps = 1, - .NumberInputValueCaps = 3, - .NumberInputDataIndices = 11, + /* without report id */ + { + .Usage = HID_USAGE_GENERIC_JOYSTICK, + .UsagePage = HID_USAGE_PAGE_GENERIC, + .InputReportByteLength = 11, + .FeatureReportByteLength = 14, + .NumberLinkCollectionNodes = 7, + .NumberInputButtonCaps = 5, + .NumberInputValueCaps = 4, + .NumberInputDataIndices = 32, + .NumberFeatureButtonCaps = 1, + .NumberFeatureValueCaps = 5, + .NumberFeatureDataIndices = 7, + }, + /* with report id */ + { + .Usage = HID_USAGE_GENERIC_JOYSTICK, + .UsagePage = HID_USAGE_PAGE_GENERIC, + .InputReportByteLength = 10, + .FeatureReportByteLength = 13, + .NumberLinkCollectionNodes = 7, + .NumberInputButtonCaps = 5, + .NumberInputValueCaps = 4, + .NumberInputDataIndices = 32, + .NumberFeatureButtonCaps = 1, + .NumberFeatureValueCaps = 5, + .NumberFeatureDataIndices = 7, + }, }; const HIDP_BUTTON_CAPS expect_button_caps[] = { @@ -1667,6 +1688,48 @@ static void test_hidp(HANDLE file, int report_id) .Range.DataIndexMin = 2, .Range.DataIndexMax = 9, }, + { + .UsagePage = HID_USAGE_PAGE_BUTTON, + .ReportID = report_id, + .BitField = 3, + .LinkCollection = 1, + .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, + .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .IsRange = TRUE, + .IsAbsolute = TRUE, + .Range.UsageMin = 0x18, + .Range.UsageMax = 0x1f, + .Range.DataIndexMin = 10, + .Range.DataIndexMax = 17, + }, + { + .UsagePage = HID_USAGE_PAGE_KEYBOARD, + .ReportID = report_id, + .BitField = 0x1fc, + .LinkCollection = 1, + .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, + .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .IsRange = TRUE, + .IsAbsolute = FALSE, + .Range.UsageMin = 0x8, + .Range.UsageMax = 0xf, + .Range.DataIndexMin = 18, + .Range.DataIndexMax = 25, + }, + { + .UsagePage = HID_USAGE_PAGE_BUTTON, + .ReportID = report_id, + .BitField = 2, + .LinkCollection = 1, + .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, + .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .IsRange = FALSE, + .IsAbsolute = TRUE, + .NotRange.Usage = 0x20, + .NotRange.Reserved1 = 0x20, + .NotRange.DataIndex = 26, + .NotRange.Reserved4 = 26, + }, }; const HIDP_VALUE_CAPS expect_value_caps[] = { @@ -1683,6 +1746,7 @@ static void test_hidp(HANDLE file, int report_id) .LogicalMin = -128, .LogicalMax = 127, .NotRange.Usage = HID_USAGE_GENERIC_Y, + .NotRange.Reserved1 = HID_USAGE_GENERIC_Y, }, { .UsagePage = HID_USAGE_PAGE_GENERIC, @@ -1697,7 +1761,25 @@ static void test_hidp(HANDLE file, int report_id) .LogicalMin = -128, .LogicalMax = 127, .NotRange.Usage = HID_USAGE_GENERIC_X, + .NotRange.Reserved1 = HID_USAGE_GENERIC_X, .NotRange.DataIndex = 1, + .NotRange.Reserved4 = 1, + }, + { + .UsagePage = HID_USAGE_PAGE_BUTTON, + .ReportID = report_id, + .BitField = 2, + .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, + .LinkUsagePage = HID_USAGE_PAGE_GENERIC, + .LinkCollection = 1, + .IsAbsolute = TRUE, + .ReportCount = 1, + .LogicalMax = 1, + .IsRange = TRUE, + .Range.UsageMin = 0x21, + .Range.UsageMax = 0x22, + .Range.DataIndexMin = 27, + .Range.DataIndexMax = 28, }, { .UsagePage = HID_USAGE_PAGE_GENERIC, @@ -1711,9 +1793,10 @@ static void test_hidp(HANDLE file, int report_id) .ReportCount = 2, .LogicalMin = 1, .LogicalMax = 8, - .PhysicalMax = 8, .NotRange.Usage = HID_USAGE_GENERIC_HATSWITCH, - .NotRange.DataIndex = 10, + .NotRange.Reserved1 = HID_USAGE_GENERIC_HATSWITCH, + .NotRange.DataIndex = 29, + .NotRange.Reserved4 = 29, }, }; static const HIDP_LINK_COLLECTION_NODE expect_collections[] = @@ -1722,8 +1805,8 @@ static void test_hidp(HANDLE file, int report_id) .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, .CollectionType = 1, - .NumberOfChildren = 1, - .FirstChild = 1, + .NumberOfChildren = 4, + .FirstChild = 6, }, { .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, @@ -1752,7 +1835,25 @@ static void test_hidp(HANDLE file, int report_id) ok(status == HIDP_STATUS_INVALID_PREPARSED_DATA, "HidP_GetCaps returned %#x\n", status); status = HidP_GetCaps(preparsed_data, &caps); ok(status == HIDP_STATUS_SUCCESS, "HidP_GetCaps returned %#x\n", status); - check_hidp_caps(&caps, &expect_hidp_caps); + check_member(caps, expect_hidp_caps[report_id], "%04x", Usage); + check_member(caps, expect_hidp_caps[report_id], "%04x", UsagePage); + check_member(caps, expect_hidp_caps[report_id], "%d", InputReportByteLength); + check_member(caps, expect_hidp_caps[report_id], "%d", OutputReportByteLength); + check_member(caps, expect_hidp_caps[report_id], "%d", FeatureReportByteLength); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberLinkCollectionNodes); + todo_wine + check_member(caps, expect_hidp_caps[report_id], "%d", NumberInputButtonCaps); + todo_wine + check_member(caps, expect_hidp_caps[report_id], "%d", NumberInputValueCaps); + todo_wine + check_member(caps, expect_hidp_caps[report_id], "%d", NumberInputDataIndices); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberOutputButtonCaps); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberOutputValueCaps); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberOutputDataIndices); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberFeatureButtonCaps); + check_member(caps, expect_hidp_caps[report_id], "%d", NumberFeatureValueCaps); + todo_wine + check_member(caps, expect_hidp_caps[report_id], "%d", NumberFeatureDataIndices);
collection_count = 0; status = HidP_GetLinkCollectionNodes(collections, &collection_count, preparsed_data); @@ -1771,7 +1872,16 @@ static void test_hidp(HANDLE file, int report_id) for (i = 0; i < ARRAY_SIZE(expect_collections); ++i) { winetest_push_context("collections[%d]", i); - check_hidp_link_collection_node(collections + i, expect_collections + i); + check_member(collections[i], expect_collections[i], "%04x", LinkUsage); + check_member(collections[i], expect_collections[i], "%04x", LinkUsagePage); + check_member(collections[i], expect_collections[i], "%d", Parent); + check_member(collections[i], expect_collections[i], "%d", NumberOfChildren); + todo_wine_if(i == 1) + check_member(collections[i], expect_collections[i], "%d", NextSibling); + todo_wine_if(i == 0) + check_member(collections[i], expect_collections[i], "%d", FirstChild); + check_member(collections[i], expect_collections[i], "%d", CollectionType); + check_member(collections[i], expect_collections[i], "%d", IsAlias); winetest_pop_context(); }
@@ -1791,6 +1901,7 @@ static void test_hidp(HANDLE file, int report_id) count = ARRAY_SIZE(button_caps); status = HidP_GetButtonCaps(HidP_Input, button_caps, &count, (PHIDP_PREPARSED_DATA)buffer); ok(status == HIDP_STATUS_INVALID_PREPARSED_DATA, "HidP_GetButtonCaps returned %#x\n", status); + memset(button_caps, 0, sizeof(button_caps)); status = HidP_GetButtonCaps(HidP_Input, button_caps, &count, preparsed_data); ok(status == HIDP_STATUS_SUCCESS, "HidP_GetButtonCaps returned %#x\n", status); ok(count == caps.NumberInputButtonCaps, "HidP_GetButtonCaps returned count %d, expected %d\n", @@ -1799,25 +1910,36 @@ static void test_hidp(HANDLE file, int report_id) for (i = 0; i < ARRAY_SIZE(expect_button_caps); ++i) { winetest_push_context("button_caps[%d]", i); + todo_wine_if(i >= 2) check_member(button_caps[i], expect_button_caps[i], "%04x", UsagePage); + todo_wine_if(i >= 2 && report_id) check_member(button_caps[i], expect_button_caps[i], "%d", ReportID); check_member(button_caps[i], expect_button_caps[i], "%d", IsAlias); todo_wine check_member(button_caps[i], expect_button_caps[i], "%d", BitField); + todo_wine_if(i >= 2) check_member(button_caps[i], expect_button_caps[i], "%d", LinkCollection); + todo_wine_if(i >= 3) check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsage); + todo_wine_if(i >= 3) check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsagePage); + todo_wine_if(i == 1) check_member(button_caps[i], expect_button_caps[i], "%d", IsRange); check_member(button_caps[i], expect_button_caps[i], "%d", IsStringRange); check_member(button_caps[i], expect_button_caps[i], "%d", IsDesignatorRange); + todo_wine_if(i >= 2) check_member(button_caps[i], expect_button_caps[i], "%d", IsAbsolute); + todo_wine_if(i >= 1) check_member(button_caps[i], expect_button_caps[i], "%04x", Range.UsageMin); + todo_wine_if(i >= 1) check_member(button_caps[i], expect_button_caps[i], "%04x", Range.UsageMax); check_member(button_caps[i], expect_button_caps[i], "%d", Range.StringMin); check_member(button_caps[i], expect_button_caps[i], "%d", Range.StringMax); check_member(button_caps[i], expect_button_caps[i], "%d", Range.DesignatorMin); check_member(button_caps[i], expect_button_caps[i], "%d", Range.DesignatorMax); + todo_wine_if(i >= 1) check_member(button_caps[i], expect_button_caps[i], "%d", Range.DataIndexMin); + todo_wine_if(i >= 1) check_member(button_caps[i], expect_button_caps[i], "%d", Range.DataIndexMax); winetest_pop_context(); } @@ -1891,6 +2013,7 @@ static void test_hidp(HANDLE file, int report_id) for (i = 0; i < ARRAY_SIZE(expect_value_caps); ++i) { winetest_push_context("value_caps[%d]", i); + todo_wine_if(i == 3) check_member(value_caps[i], expect_value_caps[i], "%04x", UsagePage); check_member(value_caps[i], expect_value_caps[i], "%d", ReportID); check_member(value_caps[i], expect_value_caps[i], "%d", IsAlias); @@ -1899,28 +2022,42 @@ static void test_hidp(HANDLE file, int report_id) check_member(value_caps[i], expect_value_caps[i], "%d", LinkCollection); check_member(value_caps[i], expect_value_caps[i], "%04x", LinkUsage); check_member(value_caps[i], expect_value_caps[i], "%04x", LinkUsagePage); + todo_wine_if(i == 3) check_member(value_caps[i], expect_value_caps[i], "%d", IsRange); check_member(value_caps[i], expect_value_caps[i], "%d", IsStringRange); check_member(value_caps[i], expect_value_caps[i], "%d", IsDesignatorRange); + todo_wine_if(i == 2) check_member(value_caps[i], expect_value_caps[i], "%d", IsAbsolute); + todo_wine_if(i == 2) check_member(value_caps[i], expect_value_caps[i], "%d", HasNull); + todo_wine_if(i >= 2) check_member(value_caps[i], expect_value_caps[i], "%d", BitSize); + todo_wine_if(i == 2) check_member(value_caps[i], expect_value_caps[i], "%d", ReportCount); check_member(value_caps[i], expect_value_caps[i], "%d", UnitsExp); check_member(value_caps[i], expect_value_caps[i], "%d", Units); + todo_wine_if(i >= 3) check_member(value_caps[i], expect_value_caps[i], "%d", LogicalMin); + todo_wine_if(i >= 2) check_member(value_caps[i], expect_value_caps[i], "%d", LogicalMax); check_member(value_caps[i], expect_value_caps[i], "%d", PhysicalMin); check_member(value_caps[i], expect_value_caps[i], "%d", PhysicalMax); - todo_wine_if(i != 2) - check_member(value_caps[i], expect_value_caps[i], "%04x", NotRange.Usage); - check_member(value_caps[i], expect_value_caps[i], "%d", NotRange.StringIndex); - check_member(value_caps[i], expect_value_caps[i], "%d", NotRange.DesignatorIndex); - check_member(value_caps[i], expect_value_caps[i], "%d", NotRange.DataIndex); + todo_wine + check_member(value_caps[i], expect_value_caps[i], "%04x", Range.UsageMin); + todo_wine + check_member(value_caps[i], expect_value_caps[i], "%04x", Range.UsageMax); + check_member(value_caps[i], expect_value_caps[i], "%d", Range.StringMin); + check_member(value_caps[i], expect_value_caps[i], "%d", Range.StringMax); + check_member(value_caps[i], expect_value_caps[i], "%d", Range.DesignatorMin); + check_member(value_caps[i], expect_value_caps[i], "%d", Range.DesignatorMax); + todo_wine_if(i >= 2) + check_member(value_caps[i], expect_value_caps[i], "%d", Range.DataIndexMin); + todo_wine_if(i >= 2) + check_member(value_caps[i], expect_value_caps[i], "%d", Range.DataIndexMax); winetest_pop_context(); }
- count = ARRAY_SIZE(value_caps) - 3; + count = ARRAY_SIZE(value_caps) - 4; status = HidP_GetSpecificValueCaps(HidP_Output, 0, 0, 0, value_caps, &count, preparsed_data); todo_wine ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_GetSpecificValueCaps returned %#x\n", status); @@ -1933,24 +2070,61 @@ static void test_hidp(HANDLE file, int report_id) todo_wine ok(count == caps.NumberInputValueCaps, "HidP_GetSpecificValueCaps returned count %d, expected %d\n", count, caps.NumberInputValueCaps); - count = ARRAY_SIZE(value_caps) - 3; - status = HidP_GetSpecificValueCaps(HidP_Input, 0, 0, 0, value_caps + 3, &count, (PHIDP_PREPARSED_DATA)buffer); + count = ARRAY_SIZE(value_caps) - 4; + status = HidP_GetSpecificValueCaps(HidP_Input, 0, 0, 0, value_caps + 4, &count, (PHIDP_PREPARSED_DATA)buffer); ok(status == HIDP_STATUS_INVALID_PREPARSED_DATA, "HidP_GetSpecificValueCaps returned %#x\n", status);
- status = HidP_GetSpecificValueCaps(HidP_Input, 0, 0, 0, value_caps + 3, &count, preparsed_data); + status = HidP_GetSpecificValueCaps(HidP_Input, 0, 0, 0, value_caps + 4, &count, preparsed_data); ok(status == HIDP_STATUS_SUCCESS, "HidP_GetSpecificValueCaps returned %#x\n", status); ok(count == caps.NumberInputValueCaps, "HidP_GetSpecificValueCaps returned count %d, expected %d\n", count, caps.NumberInputValueCaps); - check_hidp_value_caps(&value_caps[3], &value_caps[0]); - check_hidp_value_caps(&value_caps[4], &value_caps[1]); - check_hidp_value_caps(&value_caps[5], &value_caps[2]); + check_hidp_value_caps(&value_caps[4], &value_caps[0]); + check_hidp_value_caps(&value_caps[5], &value_caps[1]); + check_hidp_value_caps(&value_caps[6], &value_caps[2]); + check_hidp_value_caps(&value_caps[7], &value_caps[3]);
count = 1; status = HidP_GetSpecificValueCaps(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_HATSWITCH, - value_caps + 3, &count, preparsed_data); + value_caps + 4, &count, preparsed_data); ok(status == HIDP_STATUS_SUCCESS, "HidP_GetSpecificValueCaps returned %#x\n", status); ok(count == 1, "HidP_GetSpecificValueCaps returned count %d, expected %d\n", count, 1); - check_hidp_value_caps(&value_caps[3], &value_caps[2]); + + todo_wine + check_member(value_caps[4], value_caps[3], "%04x", UsagePage); + check_member(value_caps[4], value_caps[3], "%d", ReportID); + check_member(value_caps[4], value_caps[3], "%d", IsAlias); + check_member(value_caps[4], value_caps[3], "%d", BitField); + check_member(value_caps[4], value_caps[3], "%d", LinkCollection); + check_member(value_caps[4], value_caps[3], "%04x", LinkUsage); + check_member(value_caps[4], value_caps[3], "%04x", LinkUsagePage); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", IsRange); + check_member(value_caps[4], value_caps[3], "%d", IsStringRange); + check_member(value_caps[4], value_caps[3], "%d", IsDesignatorRange); + check_member(value_caps[4], value_caps[3], "%d", IsAbsolute); + check_member(value_caps[4], value_caps[3], "%d", HasNull); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", BitSize); + check_member(value_caps[4], value_caps[3], "%d", ReportCount); + check_member(value_caps[4], value_caps[3], "%d", UnitsExp); + check_member(value_caps[4], value_caps[3], "%d", Units); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", LogicalMin); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", LogicalMax); + check_member(value_caps[4], value_caps[3], "%d", PhysicalMin); + check_member(value_caps[4], value_caps[3], "%d", PhysicalMax); + todo_wine + check_member(value_caps[4], value_caps[3], "%04x", Range.UsageMin); + check_member(value_caps[4], value_caps[3], "%04x", Range.UsageMax); + check_member(value_caps[4], value_caps[3], "%d", Range.StringMin); + check_member(value_caps[4], value_caps[3], "%d", Range.StringMax); + check_member(value_caps[4], value_caps[3], "%d", Range.DesignatorMin); + check_member(value_caps[4], value_caps[3], "%d", Range.DesignatorMax); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", Range.DataIndexMin); + todo_wine + check_member(value_caps[4], value_caps[3], "%d", Range.DataIndexMax);
count = 0xdead; status = HidP_GetSpecificValueCaps(HidP_Input, 0xfffe, 0, 0, value_caps, &count, preparsed_data); @@ -1991,6 +2165,22 @@ static void test_hidp(HANDLE file, int report_id) todo_wine_if(report_id) ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n");
+ memset(report, 0xcd, sizeof(report)); + status = HidP_InitializeReportForID(HidP_Feature, 3, preparsed_data, report, caps.FeatureReportByteLength); + todo_wine_if(!report_id) + ok(status == HIDP_STATUS_REPORT_DOES_NOT_EXIST, "HidP_InitializeReportForID returned %#x\n", status); + + memset(report, 0xcd, sizeof(report)); + status = HidP_InitializeReportForID(HidP_Feature, report_id, preparsed_data, report, caps.FeatureReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_InitializeReportForID returned %#x\n", status); + + memset(buffer, 0xcd, sizeof(buffer)); + memset(buffer, 0, caps.FeatureReportByteLength); + buffer[0] = report_id; + todo_wine_if(report_id) + ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n"); + HidD_FreePreparsedData(preparsed_data); CloseHandle(file); } diff --git a/dlls/ntoskrnl.exe/tests/psh_hid_macros.h b/dlls/ntoskrnl.exe/tests/psh_hid_macros.h index 4623af20598..ad5cfa34fea 100644 --- a/dlls/ntoskrnl.exe/tests/psh_hid_macros.h +++ b/dlls/ntoskrnl.exe/tests/psh_hid_macros.h @@ -47,7 +47,7 @@ #define UsageSwitch 0x05 #define UsageModifier 0x06
-#define SHORT_ITEM_0(tag,type) (((tag)<<4)|((type)<<2)|0) +#define SHORT_ITEM_0(tag,type,data) (((tag)<<4)|((type)<<2)|0) #define SHORT_ITEM_1(tag,type,data) (((tag)<<4)|((type)<<2)|1),((data)&0xff) #define SHORT_ITEM_2(tag,type,data) (((tag)<<4)|((type)<<2)|2),((data)&0xff),(((data)>>8)&0xff) #define SHORT_ITEM_4(tag,type,data) (((tag)<<4)|((type)<<2)|3),((data)&0xff),(((data)>>8)&0xff),(((data)>>16)&0xff),(((data)>>24)&0xff) @@ -58,7 +58,7 @@ #define OUTPUT(n,data) SHORT_ITEM_##n(0x9,0,data) #define FEATURE(n,data) SHORT_ITEM_##n(0xb,0,data) #define COLLECTION(n,data) SHORT_ITEM_##n(0xa,0,data) -#define END_COLLECTION SHORT_ITEM_0(0xc,0) +#define END_COLLECTION SHORT_ITEM_0(0xc,0,0)
#define USAGE_PAGE(n,data) SHORT_ITEM_##n(0x0,1,data) #define LOGICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x1,1,data) diff --git a/dlls/winebus.sys/psh_hid_macros.h b/dlls/winebus.sys/psh_hid_macros.h index 4623af20598..ad5cfa34fea 100644 --- a/dlls/winebus.sys/psh_hid_macros.h +++ b/dlls/winebus.sys/psh_hid_macros.h @@ -47,7 +47,7 @@ #define UsageSwitch 0x05 #define UsageModifier 0x06
-#define SHORT_ITEM_0(tag,type) (((tag)<<4)|((type)<<2)|0) +#define SHORT_ITEM_0(tag,type,data) (((tag)<<4)|((type)<<2)|0) #define SHORT_ITEM_1(tag,type,data) (((tag)<<4)|((type)<<2)|1),((data)&0xff) #define SHORT_ITEM_2(tag,type,data) (((tag)<<4)|((type)<<2)|2),((data)&0xff),(((data)>>8)&0xff) #define SHORT_ITEM_4(tag,type,data) (((tag)<<4)|((type)<<2)|3),((data)&0xff),(((data)>>8)&0xff),(((data)>>16)&0xff),(((data)>>24)&0xff) @@ -58,7 +58,7 @@ #define OUTPUT(n,data) SHORT_ITEM_##n(0x9,0,data) #define FEATURE(n,data) SHORT_ITEM_##n(0xb,0,data) #define COLLECTION(n,data) SHORT_ITEM_##n(0xa,0,data) -#define END_COLLECTION SHORT_ITEM_0(0xc,0) +#define END_COLLECTION SHORT_ITEM_0(0xc,0,0)
#define USAGE_PAGE(n,data) SHORT_ITEM_##n(0x0,1,data) #define LOGICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x1,1,data)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92351
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages
=== w864 (64 bit report) ===
Report validation errors: ntoskrnl.exe:ntoskrnl crashed (c0000374)
=== debiant2 (32 bit French report) ===
ntoskrnl.exe: ntoskrnl: Timeout
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver_hid.c | 33 +++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 275 ++++++++++++++++++++++++++- 2 files changed, 298 insertions(+), 10 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 6a5aeb05fbd..345fc4c1711 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -161,6 +161,35 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) REPORT_SIZE(1, 4), REPORT_COUNT(1, 2), INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_Z), + LOGICAL_MINIMUM(4, 0x00000000), + LOGICAL_MAXIMUM(4, 0x3fffffff), + PHYSICAL_MINIMUM(4, 0x80000000), + PHYSICAL_MAXIMUM(4, 0x7fffffff), + REPORT_SIZE(1, 32), + REPORT_COUNT(1, 1), + INPUT(1, Data|Var|Abs), + + /* reset physical range to its default interpretation */ + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_RX), + PHYSICAL_MINIMUM(4, 0), + PHYSICAL_MAXIMUM(4, 0), + REPORT_SIZE(1, 32), + REPORT_COUNT(1, 1), + INPUT(1, Data|Var|Abs), + + USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), + USAGE(1, HID_USAGE_GENERIC_RY), + LOGICAL_MINIMUM(4, 0x7fff), + LOGICAL_MAXIMUM(4, 0x0000), + PHYSICAL_MINIMUM(4, 0x0000), + PHYSICAL_MAXIMUM(4, 0x7fff), + REPORT_SIZE(1, 32), + REPORT_COUNT(1, 1), + INPUT(1, Data|Var|Abs), END_COLLECTION,
USAGE_PAGE(1, HID_USAGE_PAGE_GENERIC), @@ -217,7 +246,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) PHYSICAL_MINIMUM(4, 0x00000000), PHYSICAL_MAXIMUM(4, 0xffffffff), REPORT_SIZE(1, 32), - REPORT_COUNT(1, 1), + REPORT_COUNT(1, 2), FEATURE(1, Data|Var|Abs), /* reset global items */ UNIT(1, 0), /* None */ @@ -318,7 +347,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_READ_REPORT: { - ULONG expected_size = 10; + ULONG expected_size = 22; ok(!in_size, "got input size %u\n", in_size); if (!test_failed) { diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c1427258971..9f608c7d01d 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1647,12 +1647,12 @@ static void test_hidp(HANDLE file, int report_id) { .Usage = HID_USAGE_GENERIC_JOYSTICK, .UsagePage = HID_USAGE_PAGE_GENERIC, - .InputReportByteLength = 11, - .FeatureReportByteLength = 14, + .InputReportByteLength = 23, + .FeatureReportByteLength = 18, .NumberLinkCollectionNodes = 7, .NumberInputButtonCaps = 5, - .NumberInputValueCaps = 4, - .NumberInputDataIndices = 32, + .NumberInputValueCaps = 7, + .NumberInputDataIndices = 35, .NumberFeatureButtonCaps = 1, .NumberFeatureValueCaps = 5, .NumberFeatureDataIndices = 7, @@ -1661,12 +1661,12 @@ static void test_hidp(HANDLE file, int report_id) { .Usage = HID_USAGE_GENERIC_JOYSTICK, .UsagePage = HID_USAGE_PAGE_GENERIC, - .InputReportByteLength = 10, - .FeatureReportByteLength = 13, + .InputReportByteLength = 22, + .FeatureReportByteLength = 17, .NumberLinkCollectionNodes = 7, .NumberInputButtonCaps = 5, - .NumberInputValueCaps = 4, - .NumberInputDataIndices = 32, + .NumberInputValueCaps = 7, + .NumberInputDataIndices = 35, .NumberFeatureButtonCaps = 1, .NumberFeatureValueCaps = 5, .NumberFeatureDataIndices = 7, @@ -1821,10 +1821,12 @@ static void test_hidp(HANDLE file, int report_id) HIDP_VALUE_CAPS value_caps[16]; char buffer[200], report[200]; DWORD collection_count; + DWORD waveform_list; NTSTATUS status; HIDP_CAPS caps; unsigned int i; USHORT count; + ULONG value; BOOL ret;
ret = HidD_GetPreparsedData(file, &preparsed_data); @@ -2165,6 +2167,151 @@ static void test_hidp(HANDLE file, int report_id) todo_wine_if(report_id) ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n");
+ status = HidP_SetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, buffer, + sizeof(buffer), preparsed_data, report, caps.InputReportByteLength); + todo_wine + ok(status == HIDP_STATUS_NOT_VALUE_ARRAY, "HidP_SetUsageValueArray returned %#x\n", status); + memset(buffer, 0xcd, sizeof(buffer)); + status = HidP_SetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_HATSWITCH, buffer, + 0, preparsed_data, report, caps.InputReportByteLength); + todo_wine + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_SetUsageValueArray returned %#x\n", status); + status = HidP_SetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_HATSWITCH, buffer, + 8, preparsed_data, report, caps.InputReportByteLength); + ok(status == HIDP_STATUS_NOT_IMPLEMENTED, "HidP_SetUsageValueArray returned %#x\n", status); + + status = HidP_GetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, buffer, + sizeof(buffer), preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_NOT_VALUE_ARRAY, "HidP_GetUsageValueArray returned %#x\n", status); + memset(buffer, 0xcd, sizeof(buffer)); + status = HidP_GetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_HATSWITCH, buffer, + 0, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetUsageValueArray returned %#x\n", status); + status = HidP_GetUsageValueArray(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_HATSWITCH, buffer, + 8, preparsed_data, report, caps.InputReportByteLength); + todo_wine + ok(status == HIDP_STATUS_NOT_IMPLEMENTED, "HidP_GetUsageValueArray returned %#x\n", status); + + value = -128; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + &value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 0x80, "got value %x, expected %#x\n", value, 0x80); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == -128, "got value %x, expected %#x\n", value, -128); + + value = 127; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 127, "got value %x, expected %#x\n", value, 127); + + value = 0; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_X, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 0, "got value %x, expected %#x\n", value, 0); + + value = 0x7fffffff; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine + ok(status == HIDP_STATUS_VALUE_OUT_OF_RANGE, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine + ok(value == 0, "got value %x, expected %#x\n", value, 0); + value = 0xdeadbeef; + status = HidP_GetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + &value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsageValue returned %#x\n", status); + todo_wine + ok(value == 0x7fffffff, "got value %x, expected %#x\n", value, 0x7fffffff); + + value = 0x3fffffff; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine + ok(value == 0x7fffffff, "got value %x, expected %#x\n", value, 0x7fffffff); + + value = 0; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_Z, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 0x80000000, "got value %x, expected %#x\n", value, 0x80000000); + + value = 0; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_RX, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_RX, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 0, "got value %x, expected %#x\n", value, 0); + + value = 0xfeedcafe; + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_RY, + value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + value = 0xdeadbeef; + status = HidP_GetScaledUsageValue(HidP_Input, HID_USAGE_PAGE_GENERIC, 0, HID_USAGE_GENERIC_RY, + (LONG *)&value, preparsed_data, report, caps.InputReportByteLength); + todo_wine + ok(status == HIDP_STATUS_BAD_LOG_PHY_VALUES, "HidP_GetScaledUsageValue returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 0, "got value %x, expected %#x\n", value, 0); + memset(report, 0xcd, sizeof(report)); status = HidP_InitializeReportForID(HidP_Feature, 3, preparsed_data, report, caps.FeatureReportByteLength); todo_wine_if(!report_id) @@ -2181,6 +2328,118 @@ static void test_hidp(HANDLE file, int report_id) todo_wine_if(report_id) ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n");
+ for (i = 0; i < caps.NumberLinkCollectionNodes; ++i) + { + if (collections[i].LinkUsagePage != HID_USAGE_PAGE_HAPTICS) continue; + if (collections[i].LinkUsage == HID_USAGE_HAPTICS_WAVEFORM_LIST) break; + } + ok(i < caps.NumberLinkCollectionNodes, + "HID_USAGE_HAPTICS_WAVEFORM_LIST collection not found\n"); + waveform_list = i; + + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, (PHIDP_PREPARSED_DATA)buffer, + report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_INVALID_PREPARSED_DATA, "HidP_SetUsageValue returned %#x\n", status); + status = HidP_SetUsageValue(HidP_Feature + 1, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, preparsed_data, report, + caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_INVALID_REPORT_TYPE, "HidP_SetUsageValue returned %#x\n", status); + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, preparsed_data, report, + caps.FeatureReportByteLength + 1); + todo_wine + ok(status == HIDP_STATUS_INVALID_REPORT_LENGTH, "HidP_SetUsageValue returned %#x\n", status); + report[0] = 1 - report_id; + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, preparsed_data, report, + caps.FeatureReportByteLength); + todo_wine + ok(status == (report_id ? HIDP_STATUS_SUCCESS : HIDP_STATUS_INCOMPATIBLE_REPORT_ID), + "HidP_GetUsageValue returned %#x\n", status); + report[0] = 2; + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, preparsed_data, report, + caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_INCOMPATIBLE_REPORT_ID, "HidP_SetUsageValue returned %#x\n", status); + report[0] = report_id; + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, 0xdead, 3, HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, + preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_SetUsageValue returned %#x\n", status); + + status = HidP_SetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, preparsed_data, report, + caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValue returned %#x\n", status); + + memset(buffer, 0xcd, sizeof(buffer)); + memset(buffer, 0, caps.FeatureReportByteLength); + buffer[0] = report_id; + value = HID_USAGE_HAPTICS_WAVEFORM_RUMBLE; + memcpy(buffer + 1, &value, 2); + todo_wine + ok(!memcmp(buffer, report, sizeof(buffer)), "unexpected report data\n"); + + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, &value, + (PHIDP_PREPARSED_DATA)buffer, report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_INVALID_PREPARSED_DATA, "HidP_GetUsageValue returned %#x\n", status); + status = HidP_GetUsageValue(HidP_Feature + 1, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, + &value, preparsed_data, report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_INVALID_REPORT_TYPE, "HidP_GetUsageValue returned %#x\n", status); + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, &value, + preparsed_data, report, caps.FeatureReportByteLength + 1); + todo_wine + ok(status == HIDP_STATUS_INVALID_REPORT_LENGTH, "HidP_GetUsageValue returned %#x\n", status); + report[0] = 1 - report_id; + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, &value, + preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == (report_id ? HIDP_STATUS_SUCCESS : HIDP_STATUS_INCOMPATIBLE_REPORT_ID), + "HidP_GetUsageValue returned %#x\n", status); + report[0] = 2; + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, &value, + preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_INCOMPATIBLE_REPORT_ID, "HidP_GetUsageValue returned %#x\n", status); + report[0] = report_id; + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, 0xdead, 3, &value, + preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_GetUsageValue returned %#x\n", status); + + value = 0xdeadbeef; + status = HidP_GetUsageValue(HidP_Feature, HID_USAGE_PAGE_ORDINAL, waveform_list, 3, &value, + preparsed_data, report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsageValue returned %#x\n", status); + todo_wine + ok(value == HID_USAGE_HAPTICS_WAVEFORM_RUMBLE, "got value %x, expected %#x\n", value, + HID_USAGE_HAPTICS_WAVEFORM_RUMBLE); + + memset(buffer, 0xff, sizeof(buffer)); + status = HidP_SetUsageValueArray(HidP_Feature, HID_USAGE_PAGE_HAPTICS, 0, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME, buffer, + 0, preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_SetUsageValueArray returned %#x\n", status); + status = HidP_SetUsageValueArray(HidP_Feature, HID_USAGE_PAGE_HAPTICS, 0, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME, buffer, + 64, preparsed_data, report, caps.FeatureReportByteLength); + todo_wine + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsageValueArray returned %#x\n", status); + todo_wine + ok(!memcmp(report + 9, buffer, 8), "unexpected report data\n"); + + memset(buffer, 0, sizeof(buffer)); + status = HidP_GetUsageValueArray(HidP_Feature, HID_USAGE_PAGE_HAPTICS, 0, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME, buffer, + 0, preparsed_data, report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetUsageValueArray returned %#x\n", status); + status = HidP_GetUsageValueArray(HidP_Feature, HID_USAGE_PAGE_HAPTICS, 0, HID_USAGE_HAPTICS_WAVEFORM_CUTOFF_TIME, buffer, + 64, preparsed_data, report, caps.FeatureReportByteLength); + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsageValueArray returned %#x\n", status); + memset(buffer + 16, 0xff, 8); + todo_wine + ok(!memcmp(buffer, buffer + 16, 16), "unexpected report value\n"); + HidD_FreePreparsedData(preparsed_data); CloseHandle(file); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92352
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/driver_hid.c | 24 ++++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 154 ++++++++++++++++++++++++--- 2 files changed, 162 insertions(+), 16 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c index 345fc4c1711..f26233fa6d9 100644 --- a/dlls/ntoskrnl.exe/tests/driver_hid.c +++ b/dlls/ntoskrnl.exe/tests/driver_hid.c @@ -206,6 +206,28 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp) INPUT(1, Data|Var|Abs), END_COLLECTION,
+ USAGE_PAGE(1, HID_USAGE_PAGE_LED), + USAGE(1, HID_USAGE_LED_GREEN), + COLLECTION(1, Report), + REPORT_ID_OR_USAGE_PAGE(1, report_id, 0), + USAGE_PAGE(1, HID_USAGE_PAGE_LED), + USAGE(1, 1), + USAGE(1, 2), + USAGE(1, 3), + USAGE(1, 4), + USAGE(1, 5), + USAGE(1, 6), + USAGE(1, 7), + USAGE(1, 8), + LOGICAL_MINIMUM(1, 0), + LOGICAL_MAXIMUM(1, 1), + PHYSICAL_MINIMUM(1, 0), + PHYSICAL_MAXIMUM(1, 1), + REPORT_COUNT(1, 8), + REPORT_SIZE(1, 1), + INPUT(1, Data|Var|Abs), + END_COLLECTION, + USAGE_PAGE(2, HID_USAGE_PAGE_HAPTICS), USAGE(1, HID_USAGE_HAPTICS_SIMPLE_CONTROLLER), COLLECTION(1, Logical), @@ -347,7 +369,7 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device, IRP *irp)
case IOCTL_HID_READ_REPORT: { - ULONG expected_size = 22; + ULONG expected_size = 23; ok(!in_size, "got input size %u\n", in_size); if (!test_failed) { diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 9f608c7d01d..9b17e36c0ea 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1647,12 +1647,12 @@ static void test_hidp(HANDLE file, int report_id) { .Usage = HID_USAGE_GENERIC_JOYSTICK, .UsagePage = HID_USAGE_PAGE_GENERIC, - .InputReportByteLength = 23, + .InputReportByteLength = 24, .FeatureReportByteLength = 18, - .NumberLinkCollectionNodes = 7, - .NumberInputButtonCaps = 5, + .NumberLinkCollectionNodes = 8, + .NumberInputButtonCaps = 13, .NumberInputValueCaps = 7, - .NumberInputDataIndices = 35, + .NumberInputDataIndices = 43, .NumberFeatureButtonCaps = 1, .NumberFeatureValueCaps = 5, .NumberFeatureDataIndices = 7, @@ -1661,12 +1661,12 @@ static void test_hidp(HANDLE file, int report_id) { .Usage = HID_USAGE_GENERIC_JOYSTICK, .UsagePage = HID_USAGE_PAGE_GENERIC, - .InputReportByteLength = 22, + .InputReportByteLength = 23, .FeatureReportByteLength = 17, - .NumberLinkCollectionNodes = 7, - .NumberInputButtonCaps = 5, + .NumberLinkCollectionNodes = 8, + .NumberInputButtonCaps = 13, .NumberInputValueCaps = 7, - .NumberInputDataIndices = 35, + .NumberInputDataIndices = 43, .NumberFeatureButtonCaps = 1, .NumberFeatureValueCaps = 5, .NumberFeatureDataIndices = 7, @@ -1805,8 +1805,8 @@ static void test_hidp(HANDLE file, int report_id) .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, .LinkUsagePage = HID_USAGE_PAGE_GENERIC, .CollectionType = 1, - .NumberOfChildren = 4, - .FirstChild = 6, + .NumberOfChildren = 5, + .FirstChild = 7, }, { .LinkUsage = HID_USAGE_GENERIC_JOYSTICK, @@ -1817,11 +1817,13 @@ static void test_hidp(HANDLE file, int report_id)
HIDP_LINK_COLLECTION_NODE collections[16]; PHIDP_PREPARSED_DATA preparsed_data; + USAGE_AND_PAGE usage_and_pages[16]; HIDP_BUTTON_CAPS button_caps[16]; HIDP_VALUE_CAPS value_caps[16]; char buffer[200], report[200]; DWORD collection_count; DWORD waveform_list; + USAGE usages[16]; NTSTATUS status; HIDP_CAPS caps; unsigned int i; @@ -1914,22 +1916,21 @@ static void test_hidp(HANDLE file, int report_id) winetest_push_context("button_caps[%d]", i); todo_wine_if(i >= 2) check_member(button_caps[i], expect_button_caps[i], "%04x", UsagePage); - todo_wine_if(i >= 2 && report_id) check_member(button_caps[i], expect_button_caps[i], "%d", ReportID); check_member(button_caps[i], expect_button_caps[i], "%d", IsAlias); todo_wine check_member(button_caps[i], expect_button_caps[i], "%d", BitField); todo_wine_if(i >= 2) check_member(button_caps[i], expect_button_caps[i], "%d", LinkCollection); - todo_wine_if(i >= 3) + todo_wine_if(i >= (report_id ? 2 : 3)) check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsage); - todo_wine_if(i >= 3) + todo_wine_if(i >= (report_id ? 2 : 3)) check_member(button_caps[i], expect_button_caps[i], "%04x", LinkUsagePage); - todo_wine_if(i == 1) + todo_wine_if(i >= 1 && i <= (report_id ? 2 : 1)) check_member(button_caps[i], expect_button_caps[i], "%d", IsRange); check_member(button_caps[i], expect_button_caps[i], "%d", IsStringRange); check_member(button_caps[i], expect_button_caps[i], "%d", IsDesignatorRange); - todo_wine_if(i >= 2) + todo_wine_if(i == 2) check_member(button_caps[i], expect_button_caps[i], "%d", IsAbsolute); todo_wine_if(i >= 1) check_member(button_caps[i], expect_button_caps[i], "%04x", Range.UsageMin); @@ -2312,6 +2313,129 @@ static void test_hidp(HANDLE file, int report_id) todo_wine_if(report_id) ok(value == 0, "got value %x, expected %#x\n", value, 0);
+ value = HidP_MaxUsageListLength(HidP_Feature + 1, 0, preparsed_data); + todo_wine + ok(value == 0, "HidP_MaxUsageListLength(HidP_Feature + 1, 0) returned %d, expected %d\n", value, 0); + value = HidP_MaxUsageListLength(HidP_Input, 0, preparsed_data); + todo_wine + ok(value == 42, "HidP_MaxUsageListLength(HidP_Input, 0) returned %d, expected %d\n", value, 42); + value = HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON, preparsed_data); + todo_wine + ok(value == 32, "HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned %d, expected %d\n", value, 32); + value = HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED, preparsed_data); + ok(value == 8, "HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned %d, expected %d\n", value, 8); + value = HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON, preparsed_data); + todo_wine + ok(value == 8, "HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned %d, expected %d\n", value, 8); + value = HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_LED, preparsed_data); + ok(value == 0, "HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_LED) returned %d, expected %d\n", value, 0); + + usages[0] = 0xff; + value = 1; + status = HidP_SetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_SetUsages returned %#x\n", status); + usages[1] = 2; + usages[2] = 0xff; + value = 3; + status = HidP_SetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_SetUsages returned %#x\n", status); + usages[0] = 4; + usages[1] = 6; + value = 2; + status = HidP_SetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsages returned %#x\n", status); + usages[0] = 4; + usages[1] = 6; + value = 2; + status = HidP_SetUsages(HidP_Input, HID_USAGE_PAGE_LED, 0, usages, &value, preparsed_data, + report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_SetUsages returned %#x\n", status); + + status = HidP_SetUsageValue(HidP_Input, HID_USAGE_PAGE_LED, 0, 6, 1, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_SetUsageValue returned %#x\n", status); + + value = 0xdeadbeef; + status = HidP_GetUsageValue(HidP_Input, HID_USAGE_PAGE_LED, 0, 6, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_USAGE_NOT_FOUND, "HidP_SetUsageValue returned %#x\n", status); + ok(value == 0xdeadbeef, "got value %x, expected %#x\n", value, 0xdeadbeef); + + value = 1; + status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetUsages returned %#x\n", status); + todo_wine + ok(value == 2, "got usage count %d, expected %d\n", value, 2); + value = ARRAY_SIZE(usages); + memset(usages, 0xcd, sizeof(usages)); + status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_BUTTON, 0, usages, &value, + preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsages returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 2, "got usage count %d, expected %d\n", value, 2); + todo_wine_if(report_id) + ok(usages[0] == 4, "got usages[0] %x, expected %x\n", usages[0], 4); + todo_wine_if(report_id) + ok(usages[1] == 6, "got usages[1] %x, expected %x\n", usages[1], 6); + + value = ARRAY_SIZE(usages); + memset(usages, 0xcd, sizeof(usages)); + status = HidP_GetUsages(HidP_Input, HID_USAGE_PAGE_LED, 0, usages, &value, preparsed_data, + report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsages returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 2, "got usage count %d, expected %d\n", value, 2); + todo_wine + ok(usages[0] == 6, "got usages[0] %x, expected %x\n", usages[0], 6); + todo_wine + ok(usages[1] == 4, "got usages[1] %x, expected %x\n", usages[1], 4); + + value = ARRAY_SIZE(usage_and_pages); + memset(usage_and_pages, 0xcd, sizeof(usage_and_pages)); + status = HidP_GetUsagesEx(HidP_Input, 0, usage_and_pages, &value, preparsed_data, report, + caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetUsagesEx returned %#x\n", status); + todo_wine_if(report_id) + ok(value == 4, "got usage count %d, expected %d\n", value, 4); + todo_wine_if(report_id) + ok(usage_and_pages[0].UsagePage == HID_USAGE_PAGE_BUTTON, "got usage_and_pages[0] UsagePage %x, expected %x\n", + usage_and_pages[0].UsagePage, HID_USAGE_PAGE_BUTTON); + todo_wine_if(report_id) + ok(usage_and_pages[1].UsagePage == HID_USAGE_PAGE_BUTTON, "got usage_and_pages[1] UsagePage %x, expected %x\n", + usage_and_pages[1].UsagePage, HID_USAGE_PAGE_BUTTON); + todo_wine_if(report_id) + ok(usage_and_pages[2].UsagePage == HID_USAGE_PAGE_LED, "got usage_and_pages[2] UsagePage %x, expected %x\n", + usage_and_pages[2].UsagePage, HID_USAGE_PAGE_LED); + todo_wine_if(report_id) + ok(usage_and_pages[3].UsagePage == HID_USAGE_PAGE_LED, "got usage_and_pages[3] UsagePage %x, expected %x\n", + usage_and_pages[3].UsagePage, HID_USAGE_PAGE_LED); + todo_wine_if(report_id) + ok(usage_and_pages[0].Usage == 4, "got usage_and_pages[0] Usage %x, expected %x\n", + usage_and_pages[0].Usage, 4); + todo_wine_if(report_id) + ok(usage_and_pages[1].Usage == 6, "got usage_and_pages[1] Usage %x, expected %x\n", + usage_and_pages[1].Usage, 6); + todo_wine + ok(usage_and_pages[2].Usage == 6, "got usage_and_pages[2] Usage %x, expected %x\n", + usage_and_pages[2].Usage, 6); + todo_wine + ok(usage_and_pages[3].Usage == 4, "got usage_and_pages[3] Usage %x, expected %x\n", + usage_and_pages[3].Usage, 4); + memset(report, 0xcd, sizeof(report)); status = HidP_InitializeReportForID(HidP_Feature, 3, preparsed_data, report, caps.FeatureReportByteLength); todo_wine_if(!report_id)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92353
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages ntoskrnl.c:1253: Test failed: got 0 bus removal messages ntoskrnl.c:1278: Test failed: got 0 child arrival messages ntoskrnl.c:1285: Test failed: failed to get device, error 0x103 ntoskrnl.c:1286: Test failed: wrong class {4d36e97d-e325-11ce-bfc1-08002be10318} ntoskrnl.c:1289: Test failed: failed to get device ID, error 0x57 ntoskrnl.c:1290: Test failed: got ID "\x05" ntoskrnl.c:1294: Test failed: got error 0x57 ntoskrnl.c:1311: Test failed: got error 0x57 ntoskrnl.c:1316: Test failed: got error 0x57 ntoskrnl.c:1320: Test failed: got error 0x57 ntoskrnl.c:1321: Test failed: got type 6357104 ntoskrnl.c:1322: Test failed: got size 0 ntoskrnl.c:1327: Test failed: got error 0x57 ntoskrnl.c:1328: Test failed: got type 6357104 ntoskrnl.c:1329: Test failed: got size 0 ntoskrnl.c:1334: Test failed: got error 0x57 ntoskrnl.c:1361: Test failed: got 0 child arrival messages ntoskrnl.c:1362: Test failed: got 0 child removal messages ntoskrnl.c:1365: Test failed: got 0 ntoskrnl.c:1465: Test failed: failed to get device list, error 0xd ntoskrnl.c:294: Test failed: expected SERVICE_STOPPED, got 4 ntoskrnl.c:2692: Test failed: failed to install device, error 0x436 ntoskrnl.c:2615: Test failed: report 0: didn't find device ntoskrnl.c:2619: Test failed: report 0: got error 123 ntoskrnl.c:1835: Test failed: report 0: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1841: Test failed: report 0: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1842: Test failed: report 0: got Usage 0009, expected 0004 ntoskrnl.c:1843: Test failed: report 0: got UsagePage 0000, expected 0001 ntoskrnl.c:1844: Test failed: report 0: got InputReportByteLength 1, expected 24 ntoskrnl.c:1846: Test failed: report 0: got FeatureReportByteLength 0, expected 18 ntoskrnl.c:1847: Test failed: report 0: got NumberLinkCollectionNodes 1, expected 8 ntoskrnl.c:1849: Test failed: report 0: got NumberInputButtonCaps 0, expected 13 ntoskrnl.c:1851: Test failed: report 0: got NumberInputValueCaps 57828, expected 7 ntoskrnl.c:1853: Test failed: report 0: got NumberInputDataIndices 34, expected 43 ntoskrnl.c:1856: Test failed: report 0: got NumberOutputDataIndices 16617, expected 0 ntoskrnl.c:1857: Test failed: report 0: got NumberFeatureButtonCaps 30502, expected 1 ntoskrnl.c:1858: Test failed: report 0: got NumberFeatureValueCaps 16616, expected 5 ntoskrnl.c:1860: Test failed: report 0: got NumberFeatureDataIndices 30502, expected 7 ntoskrnl.c:1864: Test failed: report 0: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1866: Test failed: report 0: got 0 collection nodes, expected 1 ntoskrnl.c:1872: Test failed: report 0: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1873: Test failed: report 0: got 16 collection nodes, expected 1 ntoskrnl.c:1879: Test failed: report 0: collections[0]: got LinkUsage 77d5, expected 0004 ntoskrnl.c:1880: Test failed: report 0: collections[0]: got LinkUsagePage 752d, expected 0001 ntoskrnl.c:1881: Test failed: report 0: collections[0]: got Parent 99, expected 0 ntoskrnl.c:1882: Test failed: report 0: collections[0]: got NumberOfChildren 0, expected 5 ntoskrnl.c:1884: Test failed: report 0: collections[0]: got NextSibling 63371, expected 0 ntoskrnl.c:1886: Test failed: report 0: collections[0]: got FirstChild 29998, expected 7 ntoskrnl.c:1887: Test failed: report 0: collections[0]: got CollectionType 48, expected 1 ntoskrnl.c:1879: Test failed: report 0: collections[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1880: Test failed: report 0: collections[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1881: Test failed: report 0: collections[1]: got Parent 64188, expected 0 ntoskrnl.c:1882: Test failed: report 0: collections[1]: got NumberOfChildren 52, expected 0 ntoskrnl.c:1887: Test failed: report 0: collections[1]: got CollectionType 152, expected 2 ntoskrnl.c:1888: Test failed: report 0: collections[1]: got IsAlias 1, expected 0 ntoskrnl.c:1895: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1897: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1901: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1910: Test failed: report 0: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1911: Test failed: report 0: HidP_GetButtonCaps returned count 16, expected 0 ntoskrnl.c:1918: Test failed: report 0: button_caps[0]: got UsagePage 0000, expected 0009 ntoskrnl.c:1922: Test failed: report 0: button_caps[0]: got BitField 0, expected 2 ntoskrnl.c:1924: Test failed: report 0: button_caps[0]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 0: button_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 0: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 0: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1934: Test failed: report 0: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 0: button_caps[0]: got Range.UsageMin 0000, expected 0001 ntoskrnl.c:1938: Test failed: report 0: button_caps[0]: got Range.UsageMax 0000, expected 0008 ntoskrnl.c:1944: Test failed: report 0: button_caps[0]: got Range.DataIndexMin 0, expected 2 ntoskrnl.c:1946: Test failed: report 0: button_caps[0]: got Range.DataIndexMax 0, expected 9 ntoskrnl.c:1918: Test failed: report 0: button_caps[1]: got UsagePage 0000, expected 0009 ntoskrnl.c:1922: Test failed: report 0: button_caps[1]: got BitField 0, expected 3 ntoskrnl.c:1924: Test failed: report 0: button_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 0: button_caps[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 0: button_caps[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 0: button_caps[1]: got IsRange 0, expected 1 ntoskrnl.c:1934: Test failed: report 0: button_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 0: button_caps[1]: got Range.UsageMin 0000, expected 0018 ntoskrnl.c:1938: Test failed: report 0: button_caps[1]: got Range.UsageMax 0000, expected 001f ntoskrnl.c:1944: Test failed: report 0: button_caps[1]: got Range.DataIndexMin 0, expected 10 ntoskrnl.c:1946: Test failed: report 0: button_caps[1]: got Range.DataIndexMax 0, expected 17 ntoskrnl.c:1918: Test failed: report 0: button_caps[2]: got UsagePage 0000, expected 0007 ntoskrnl.c:1922: Test failed: report 0: button_caps[2]: got BitField 0, expected 508 ntoskrnl.c:1924: Test failed: report 0: button_caps[2]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 0: button_caps[2]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 0: button_caps[2]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 0: button_caps[2]: got IsRange 0, expected 1 ntoskrnl.c:1936: Test failed: report 0: button_caps[2]: got Range.UsageMin 0000, expected 0008 ntoskrnl.c:1938: Test failed: report 0: button_caps[2]: got Range.UsageMax 0000, expected 000f ntoskrnl.c:1944: Test failed: report 0: button_caps[2]: got Range.DataIndexMin 0, expected 18 ntoskrnl.c:1946: Test failed: report 0: button_caps[2]: got Range.DataIndexMax 0, expected 25 ntoskrnl.c:1918: Test failed: report 0: button_caps[3]: got UsagePage 0000, expected 0009 ntoskrnl.c:1922: Test failed: report 0: button_caps[3]: got BitField 0, expected 2 ntoskrnl.c:1924: Test failed: report 0: button_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 0: button_caps[3]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 0: button_caps[3]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1934: Test failed: report 0: button_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 0: button_caps[3]: got Range.UsageMin 0000, expected 0020 ntoskrnl.c:1938: Test failed: report 0: button_caps[3]: got Range.UsageMax 0000, expected 0020 ntoskrnl.c:1944: Test failed: report 0: button_caps[3]: got Range.DataIndexMin 0, expected 26 ntoskrnl.c:1946: Test failed: report 0: button_caps[3]: got Range.DataIndexMax 0, expected 26 ntoskrnl.c:1953: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1955: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1959: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1968: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1969: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 15, expected 0 ntoskrnl.c:1975: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1976: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1982: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1983: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1987: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1988: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1992: Test failed: report 0: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1993: Test failed: report 0: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1998: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2000: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2004: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2006: Test failed: report 0: HidP_GetValueCaps returned count 0, expected 57828 ntoskrnl.c:2012: Test failed: report 0: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2013: Test failed: report 0: HidP_GetValueCaps returned count 16, expected 57828 ntoskrnl.c:2020: Test failed: report 0: value_caps[0]: got UsagePage 0000, expected 0001 ntoskrnl.c:2021: Test failed: report 0: value_caps[0]: got ReportID 47, expected 0 ntoskrnl.c:2024: Test failed: report 0: value_caps[0]: got BitField 56008, expected 2 ntoskrnl.c:2025: Test failed: report 0: value_caps[0]: got LinkCollection 54, expected 1 ntoskrnl.c:2026: Test failed: report 0: value_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:2027: Test failed: report 0: value_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:2029: Test failed: report 0: value_caps[0]: got IsRange 49, expected 0 ntoskrnl.c:2033: Test failed: report 0: value_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:2035: Test failed: report 0: value_caps[0]: got HasNull 172, expected 0 ntoskrnl.c:2037: Test failed: report 0: value_caps[0]: got BitSize 34, expected 8 ntoskrnl.c:2039: Test failed: report 0: value_caps[0]: got ReportCount 69, expected 1 ntoskrnl.c:2040: Test failed: report 0: value_caps[0]: got UnitsExp 2289580, expected 0 ntoskrnl.c:2041: Test failed: report 0: value_caps[0]: got Units 1997429636, expected 0 ntoskrnl.c:2043: Test failed: report 0: value_caps[0]: got LogicalMin 1997429683, expected -128 ntoskrnl.c:2045: Test failed: report 0: value_caps[0]: got LogicalMax 1999935557, expected 127 ntoskrnl.c:2047: Test failed: report 0: value_caps[0]: got PhysicalMax 3081132, expected 0 ntoskrnl.c:2049: Test failed: report 0: value_caps[0]: got Range.UsageMin 0000, expected 0031 ntoskrnl.c:2051: Test failed: report 0: value_caps[0]: got Range.UsageMax 002f, expected 0031 ntoskrnl.c:2052: Test failed: report 0: value_caps[0]: got Range.StringMin 336, expected 0 ntoskrnl.c:2053: Test failed: report 0: value_caps[0]: got Range.StringMax 47, expected 0 ntoskrnl.c:2054: Test failed: report 0: value_caps[0]: got Range.DesignatorMin 17, expected 0 ntoskrnl.c:2057: Test failed: report 0: value_caps[0]: got Range.DataIndexMin 34816, expected 0 ntoskrnl.c:2059: Test failed: report 0: value_caps[0]: got Range.DataIndexMax 57, expected 0 ntoskrnl.c:2020: Test failed: report 0: value_caps[1]: got UsagePage 0150, expected 0001 ntoskrnl.c:2021: Test failed: report 0: value_caps[1]: got ReportID 47, expected 0 ntoskrnl.c:2024: Test failed: report 0: value_caps[1]: got BitField 86, expected 2 ntoskrnl.c:2025: Test failed: report 0: value_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:2026: Test failed: report 0: value_caps[1]: got LinkUsage 0180, expected 0004 ntoskrnl.c:2027: Test failed: report 0: value_caps[1]: got LinkUsagePage 002f, expected 0001 ntoskrnl.c:2033: Test failed: report 0: value_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:2035: Test failed: report 0: value_caps[1]: got HasNull 49, expected 0 ntoskrnl.c:2037: Test failed: report 0: value_caps[1]: got BitSize 0, expected 8 ntoskrnl.c:2039: Test failed: report 0: value_caps[1]: got ReportCount 34816, expected 1 ntoskrnl.c:2040: Test failed: report 0: value_caps[1]: got UnitsExp 3988976, expected 0 ntoskrnl.c:2043: Test failed: report 0: value_caps[1]: got LogicalMin 118, expected -128 ntoskrnl.c:2045: Test failed: report 0: value_caps[1]: got LogicalMax 0, expected 127 ntoskrnl.c:2046: Test failed: report 0: value_caps[1]: got PhysicalMin 69, expected 0 ntoskrnl.c:2047: Test failed: report 0: value_caps[1]: got PhysicalMax 3943960, expected 0 ntoskrnl.c:2049: Test failed: report 0: value_caps[1]: got Range.UsageMin 0076, expected 0030 ntoskrnl.c:2051: Test failed: report 0: value_caps[1]: got Range.UsageMax 7600, expected 0030 ntoskrnl.c:2052: Test failed: report 0: value_caps[1]: got Range.StringMin 61288, expected 0 ntoskrnl.c:2053: Test failed: report 0: value_caps[1]: got Range.StringMax 34, expected 0 ntoskrnl.c:2054: Test failed: report 0: value_caps[1]: got Range.DesignatorMin 62247, expected 0 ntoskrnl.c:2055: Test failed: report 0: value_caps[1]: got Range.DesignatorMax 30479, expected 0 ntoskrnl.c:2057: Test failed: report 0: value_caps[1]: got Range.DataIndexMin 0, expected 1 ntoskrnl.c:2059: Test failed: report 0: value_caps[1]: got Range.DataIndexMax 0, expected 1 ntoskrnl.c:2020: Test failed: report 0: value_caps[2]: got UsagePage 0002, expected 0009 ntoskrnl.c:2022: Test failed: report 0: value_caps[2]: got IsAlias 2, expected 0 ntoskrnl.c:2024: Test failed: report 0: value_caps[2]: got BitField 11800, expected 2 ntoskrnl.c:2025: Test failed: report 0: value_caps[2]: got LinkCollection 60, expected 1 ntoskrnl.c:2026: Test failed: report 0: value_caps[2]: got LinkUsage 00ae, expected 0004 ntoskrnl.c:2027: Test failed: report 0: value_caps[2]: got LinkUsagePage ae00, expected 0001 ntoskrnl.c:2029: Test failed: report 0: value_caps[2]: got IsRange 104, expected 1 ntoskrnl.c:2030: Test failed: report 0: value_caps[2]: got IsStringRange 239, expected 0 ntoskrnl.c:2031: Test failed: report 0: value_caps[2]: got IsDesignatorRange 34, expected 0 ntoskrnl.c:2033: Test failed: report 0: value_caps[2]: got IsAbsolute 0, expected 1 ntoskrnl.c:2035: Test failed: report 0: value_caps[2]: got HasNull 36, expected 0 ntoskrnl.c:2039: Test failed: report 0: value_caps[2]: got ReportCount 2580, expected 1 ntoskrnl.c:2040: Test failed: report 0: value_caps[2]: got UnitsExp 2, expected 0 ntoskrnl.c:2041: Test failed: report 0: value_caps[2]: got Units 36, expected 0 ntoskrnl.c:2043: Test failed: report 0: value_caps[2]: got LogicalMin 5442068, expected 0 ntoskrnl.c:2045: Test failed: report 0: value_caps[2]: got LogicalMax 1985344143, expected 1 ntoskrnl.c:2046: Test failed: report 0: value_caps[2]: got PhysicalMin -1116892123, expected 0 ntoskrnl.c:2049: Test failed: report 0: value_caps[2]: got Range.UsageMin efb0, expected 0021 ntoskrnl.c:2052: Test failed: report 0: value_caps[2]: got Range.StringMin 62087, expected 0 ntoskrnl.c:2053: Test failed: report 0: value_caps[2]: got Range.StringMax 30293, expected 0 ntoskrnl.c:2054: Test failed: report 0: value_caps[2]: got Range.DesignatorMin 62095, expected 0 ntoskrnl.c:2055: Test failed: report 0: value_caps[2]: got Range.DesignatorMax 30293, expected 0 ntoskrnl.c:2057: Test failed: report 0: value_caps[2]: got Range.DataIndexMin 37897, expected 27 ntoskrnl.c:2059: Test failed: report 0: value_caps[2]: got Range.DataIndexMax 48493, expected 28 ntoskrnl.c:2020: Test failed: report 0: value_caps[3]: got UsagePage 0000, expected 0001 ntoskrnl.c:2024: Test failed: report 0: value_caps[3]: got BitField 36, expected 2 ntoskrnl.c:2025: Test failed: report 0: value_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:2026: Test failed: report 0: value_caps[3]: got LinkUsage 0500, expected 0004 ntoskrnl.c:2027: Test failed: report 0: value_caps[3]: got LinkUsagePage 765f, expected 0001 ntoskrnl.c:2033: Test failed: report 0: value_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:2037: Test failed: report 0: value_caps[3]: got BitSize 30303, expected 4 ntoskrnl.c:2039: Test failed: report 0: value_caps[3]: got ReportCount 36, expected 2 ntoskrnl.c:2040: Test failed: report 0: value_caps[3]: got UnitsExp 5442080, expected 0 ntoskrnl.c:2041: Test failed: report 0: value_caps[3]: got Units 2289644, expected 0 ntoskrnl.c:2043: Test failed: report 0: value_caps[3]: got LogicalMin 1985364273, expected 1 ntoskrnl.c:2045: Test failed: report 0: value_caps[3]: got LogicalMax 1, expected 8 ntoskrnl.c:2046: Test failed: report 0: value_caps[3]: got PhysicalMin 1985364229, expected 0 ntoskrnl.c:2047: Test failed: report 0: value_caps[3]: got PhysicalMax -1116892075, expected 0 ntoskrnl.c:2049: Test failed: report 0: value_caps[3]: got Range.UsageMin 0001, expected 0039 ntoskrnl.c:2051: Test failed: report 0: value_caps[3]: got Range.UsageMax 0000, expected 0039 ntoskrnl.c:2052: Test failed: report 0: value_caps[3]: got Range.StringMin 10528, expected 0 ntoskrnl.c:2053: Test failed: report 0: value_caps[3]: got Range.StringMax 30303, expected 0 ntoskrnl.c:2057: Test failed: report 0: value_caps[3]: got Range.DataIndexMin 36053, expected 29 ntoskrnl.c:2059: Test failed: report 0: value_caps[3]: got Range.DataIndexMax 30295, expected 29 ntoskrnl.c:2066: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2068: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2072: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2074: Test failed: report 0: HidP_GetSpecificValueCaps returned count 0, expected 57828 ntoskrnl.c:2081: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2082: Test failed: report 0: HidP_GetSpecificValueCaps returned count 12, expected 57828 ntoskrnl.c:2084: Test failed: report 0: got UsagePage 0001, expected 0000 ntoskrnl.c:2084: Test failed: report 0: got ReportID 0, expected 47 ntoskrnl.c:2084: Test failed: report 0: got BitField 61372, expected 56008 ntoskrnl.c:2084: Test failed: report 0: got LinkCollection 34, expected 54 ntoskrnl.c:2084: Test failed: report 0: got LinkUsage 16645, expected 0 ntoskrnl.c:2084: Test failed: report 0: got LinkUsagePage 30294, expected 0 ntoskrnl.c:2084: Test failed: report 0: got IsRange 224, expected 49 ntoskrnl.c:2084: Test failed: report 0: got IsStringRange 242, expected 0 ntoskrnl.c:2084: Test failed: report 0: got IsDesignatorRange 34, expected 0 ntoskrnl.c:2084: Test failed: report 0: got HasNull 213, expected 172 ntoskrnl.c:2084: Test failed: report 0: got BitSize 30295, expected 34 ntoskrnl.c:2084: Test failed: report 0: got ReportCount 15025, expected 69 ntoskrnl.c:2084: Test failed: report 0: got UnitsExp 1985378514, expected 2289580 ntoskrnl.c:2084: Test failed: report 0: got Units 1, expected 1997429636 ntoskrnl.c:2084: Test failed: report 0: got LogicalMin 2289684, expected 1997429683 ntoskrnl.c:2084: Test failed: report 0: got LogicalMax 1, expected 1999935557 ntoskrnl.c:2084: Test failed: report 0: got PhysicalMin 2290488, expected 0 ntoskrnl.c:2084: Test failed: report 0: got PhysicalMax 1985947936, expected 3081132 ntoskrnl.c:2084: Test failed: report 0: got Range.UsageMin f07c, expected 0000 ntoskrnl.c:2084: Test failed: report 0: got Range.UsageMax 0022, expected 002f ntoskrnl.c:2084: Test failed: report 0: got Range.DataIndexMin 10, expected 34816 ntoskrnl.c:2084: Test failed: report 0: got Range.DataIndexMax 0, expected 57 ntoskrnl.c:2085: Test failed: report 0: got UsagePage 0001, expected 0150 ntoskrnl.c:2085: Test failed: report 0: got ReportID 0, expected 47 ntoskrnl.c:2085: Test failed: report 0: got BitField 53874, expected 86 ntoskrnl.c:2085: Test failed: report 0: got LinkCollection 30293, expected 0 ntoskrnl.c:2085: Test failed: report 0: got LinkUsage 0, expected 384 ntoskrnl.c:2085: Test failed: report 0: got LinkUsagePage 0, expected 47 ntoskrnl.c:2085: Test failed: report 0: got IsRange 32, expected 0 ntoskrnl.c:2085: Test failed: report 0: got IsStringRange 41, expected 0 ntoskrnl.c:2085: Test failed: report 0: got IsDesignatorRange 95, expected 0 ntoskrnl.c:2085: Test failed: report 0: got IsAbsolute 118, expected 0 ntoskrnl.c:2085: Test failed: report 0: got HasNull 24, expected 49 ntoskrnl.c:2085: Test failed: report 0: got BitSize 30293, expected 0 ntoskrnl.c:2085: Test failed: report 0: got ReportCount 51253, expected 34816 ntoskrnl.c:2085: Test failed: report 0: got UnitsExp 1985335922, expected 3988976 ntoskrnl.c:2085: Test failed: report 0: got LogicalMin 1985947936, expected 118 ntoskrnl.c:2085: Test failed: report 0: got PhysicalMin 1985947936, expected 69 ntoskrnl.c:2085: Test failed: report 0: got PhysicalMax 0, expected 3943960 ntoskrnl.c:2086: Test failed: report 0: got UsagePage 07d0, expected 0002 ntoskrnl.c:2086: Test failed: report 0: got ReportID 83, expected 0 ntoskrnl.c:2086: Test failed: report 0: got IsAlias 0, expected 2 ntoskrnl.c:2086: Test failed: report 0: got BitField 10497, expected 11800 ntoskrnl.c:2086: Test failed: report 0: got LinkCollection 30303, expected 60 ntoskrnl.c:2086: Test failed: report 0: got LinkUsage 0, expected 174 ntoskrnl.c:2086: Test failed: report 0: got LinkUsagePage 0, expected 44544 ntoskrnl.c:2086: Test failed: report 0: got IsRange 0, expected 104 ntoskrnl.c:2086: Test failed: report 0: got IsStringRange 0, expected 239 ntoskrnl.c:2086: Test failed: report 0: got IsDesignatorRange 0, expected 34 ntoskrnl.c:2086: Test failed: report 0: got HasNull 0, expected 36 ntoskrnl.c:2086: Test failed: report 0: got ReportCount 62197, expected 2580 ntoskrnl.c:2086: Test failed: report 0: got UnitsExp 2290488, expected 2 ntoskrnl.c:2086: Test failed: report 0: got Units 10, expected 36 ntoskrnl.c:2086: Test failed: report 0: got LogicalMin 4318908, expected 5442068 ntoskrnl.c:2086: Test failed: report 0: got LogicalMax -1, expected 1985344143 ntoskrnl.c:2086: Test failed: report 0: got PhysicalMin 4321679, expected -1116892123 ntoskrnl.c:2087: Test failed: report 0: got UsagePage ffff, expected 0000 ntoskrnl.c:2087: Test failed: report 0: got ReportID 255, expected 0 ntoskrnl.c:2087: Test failed: report 0: got IsAlias 255, expected 0 ntoskrnl.c:2087: Test failed: report 0: got BitField 99, expected 36 ntoskrnl.c:2087: Test failed: report 0: got LinkCollection 117, expected 0 ntoskrnl.c:2087: Test failed: report 0: got LinkUsage 0, expected 1280 ntoskrnl.c:2087: Test failed: report 0: got LinkUsagePage 0, expected 30303 ntoskrnl.c:2087: Test failed: report 0: got IsRange 110, expected 0 ntoskrnl.c:2087: Test failed: report 0: got IsDesignatorRange 116, expected 0 ntoskrnl.c:2087: Test failed: report 0: got HasNull 115, expected 0 ntoskrnl.c:2087: Test failed: report 0: got BitSize 0, expected 30303 ntoskrnl.c:2087: Test failed: report 0: got ReportCount 0, expected 36 ntoskrnl.c:2087: Test failed: report 0: got UnitsExp 0, expected 5442080 ntoskrnl.c:2087: Test failed: report 0: got Units 0, expected 2289644 ntoskrnl.c:2087: Test failed: report 0: got LogicalMin 0, expected 1985364273 ntoskrnl.c:2087: Test failed: report 0: got LogicalMax 0, expected 1 ntoskrnl.c:2087: Test failed: report 0: got PhysicalMin 0, expected 1985364229 ntoskrnl.c:2087: Test failed: report 0: got PhysicalMax 0, expected -1116892075 ntoskrnl.c:2092: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2096: Test failed: report 0: got UsagePage 0001, expected 0000 ntoskrnl.c:2099: Test failed: report 0: got BitField 61372, expected 36 ntoskrnl.c:2100: Test failed: report 0: got LinkCollection 34, expected 0 ntoskrnl.c:2101: Test failed: report 0: got LinkUsage 4105, expected 0500 ntoskrnl.c:2102: Test failed: report 0: got LinkUsagePage 7656, expected 765f ntoskrnl.c:2104: Test failed: report 0: got IsRange 224, expected 0 ntoskrnl.c:2105: Test failed: report 0: got IsStringRange 242, expected 0 ntoskrnl.c:2106: Test failed: report 0: got IsDesignatorRange 34, expected 0 ntoskrnl.c:2108: Test failed: report 0: got HasNull 213, expected 0 ntoskrnl.c:2110: Test failed: report 0: got BitSize 30295, expected 30303 ntoskrnl.c:2111: Test failed: report 0: got ReportCount 15025, expected 36 ntoskrnl.c:2112: Test failed: report 0: got UnitsExp 1985378514, expected 5442080 ntoskrnl.c:2113: Test failed: report 0: got Units 1, expected 2289644 ntoskrnl.c:2115: Test failed: report 0: got LogicalMin 2289684, expected 1985364273 ntoskrnl.c:2118: Test failed: report 0: got PhysicalMin 2290488, expected 1985364229 ntoskrnl.c:2119: Test failed: report 0: got PhysicalMax 1985947936, expected -1116892075 ntoskrnl.c:2121: Test failed: report 0: got Range.UsageMin f07c, expected 0001 ntoskrnl.c:2122: Test failed: report 0: got Range.UsageMax 0022, expected 0000 ntoskrnl.c:2123: Test failed: report 0: got Range.StringMin 62116, expected 10528 ntoskrnl.c:2124: Test failed: report 0: got Range.StringMax 34, expected 30303 ntoskrnl.c:2125: Test failed: report 0: got Range.DesignatorMin 51253, expected 0 ntoskrnl.c:2126: Test failed: report 0: got Range.DesignatorMax 30293, expected 0 ntoskrnl.c:2128: Test failed: report 0: got Range.DataIndexMin 10, expected 36053 ntoskrnl.c:2130: Test failed: report 0: got Range.DataIndexMax 0, expected 30295 ntoskrnl.c:2135: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2136: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2140: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2141: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2145: Test failed: report 0: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2146: Test failed: report 0: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2151: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2153: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2155: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2158: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2163: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2169: Test failed: report 0: unexpected report data ntoskrnl.c:2174: Test failed: report 0: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2179: Test failed: report 0: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2182: Test failed: report 0: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2187: Test failed: report 0: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2192: Test failed: report 0: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2196: Test failed: report 0: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2202: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2207: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2209: Test failed: report 0: got value deadbeef, expected 0x80 ntoskrnl.c:2214: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2216: Test failed: report 0: got value deadbeef, expected 0xffffff80 ntoskrnl.c:2222: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2227: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2229: Test failed: report 0: got value deadbeef, expected 0x7f ntoskrnl.c:2235: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2240: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2242: Test failed: report 0: got value deadbeef, expected 0 ntoskrnl.c:2248: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2253: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2255: Test failed: report 0: got value deadbeef, expected 0 ntoskrnl.c:2260: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2262: Test failed: report 0: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2268: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2273: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2275: Test failed: report 0: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2281: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2286: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2288: Test failed: report 0: got value deadbeef, expected 0x80000000 ntoskrnl.c:2294: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2299: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2301: Test failed: report 0: got value deadbeef, expected 0 ntoskrnl.c:2307: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2312: Test failed: report 0: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2314: Test failed: report 0: got value deadbeef, expected 0 ntoskrnl.c:2321: Test failed: report 0: HidP_MaxUsageListLength(HidP_Input, 0) returned 0, expected 42 ntoskrnl.c:2324: Test failed: report 0: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned 0, expected 32 ntoskrnl.c:2326: Test failed: report 0: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned 0, expected 8 ntoskrnl.c:2329: Test failed: report 0: HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned 0, expected 8 ntoskrnl.c:2338: Test failed: report 0: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2345: Test failed: report 0: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2352: Test failed: report 0: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2359: Test failed: report 0: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2364: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2370: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2377: Test failed: report 0: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2379: Test failed: report 0: got usage count 1, expected 2 ntoskrnl.c:2385: Test failed: report 0: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2387: Test failed: report 0: got usage count 16, expected 2 ntoskrnl.c:2389: Test failed: report 0: got usages[0] cdcd, expected 4 ntoskrnl.c:2391: Test failed: report 0: got usages[1] cdcd, expected 6 ntoskrnl.c:2398: Test failed: report 0: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2400: Test failed: report 0: got usage count 16, expected 2 ntoskrnl.c:2402: Test failed: report 0: got usages[0] cdcd, expected 6 ntoskrnl.c:2404: Test failed: report 0: got usages[1] cdcd, expected 4 ntoskrnl.c:2411: Test failed: report 0: HidP_GetUsagesEx returned 0xc0110001 ntoskrnl.c:2413: Test failed: report 0: got usage count 16, expected 4 ntoskrnl.c:2415: Test failed: report 0: got usage_and_pages[0] UsagePage cdcd, expected 9 ntoskrnl.c:2418: Test failed: report 0: got usage_and_pages[1] UsagePage cdcd, expected 9 ntoskrnl.c:2421: Test failed: report 0: got usage_and_pages[2] UsagePage cdcd, expected 8 ntoskrnl.c:2424: Test failed: report 0: got usage_and_pages[3] UsagePage cdcd, expected 8 ntoskrnl.c:2427: Test failed: report 0: got usage_and_pages[0] Usage cdcd, expected 4 ntoskrnl.c:2430: Test failed: report 0: got usage_and_pages[1] Usage cdcd, expected 6 ntoskrnl.c:2433: Test failed: report 0: got usage_and_pages[2] Usage cdcd, expected 6 ntoskrnl.c:2436: Test failed: report 0: got usage_and_pages[3] Usage cdcd, expected 4 ntoskrnl.c:2442: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2447: Test failed: report 0: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2453: Test failed: report 0: unexpected report data ntoskrnl.c:2460: Test failed: report 0: HID_USAGE_HAPTICS_WAVEFORM_LIST collection not found ntoskrnl.c:2471: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2476: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2482: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2489: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2494: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2499: Test failed: report 0: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2507: Test failed: report 0: unexpected report data ntoskrnl.c:2514: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2518: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2523: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2529: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2534: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2539: Test failed: report 0: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2541: Test failed: report 0: got value deadbeef, expected 0x1005 ntoskrnl.c:2548: Test failed: report 0: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2552: Test failed: report 0: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2554: Test failed: report 0: unexpected report data ntoskrnl.c:2559: Test failed: report 0: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2562: Test failed: report 0: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2565: Test failed: report 0: unexpected report value ntoskrnl.c:2628: Test failed: report 0: got 0xc0000034 ntoskrnl.c:2715: Test failed: failed to open service, error 1060 ntoskrnl.c:294: Test failed: expected SERVICE_STOPPED, got 2284856 ntoskrnl.c:2692: Test failed: failed to install device, error 0x436 ntoskrnl.c:2615: Test failed: report 1: didn't find device ntoskrnl.c:2619: Test failed: report 1: got error 123 ntoskrnl.c:1835: Test failed: report 1: HidD_GetPreparsedData failed with error 6 ntoskrnl.c:1841: Test failed: report 1: HidP_GetCaps returned 0xc0110001 ntoskrnl.c:1842: Test failed: report 1: got Usage 0009, expected 0004 ntoskrnl.c:1843: Test failed: report 1: got UsagePage 0000, expected 0001 ntoskrnl.c:1844: Test failed: report 1: got InputReportByteLength 1, expected 23 ntoskrnl.c:1846: Test failed: report 1: got FeatureReportByteLength 0, expected 17 ntoskrnl.c:1847: Test failed: report 1: got NumberLinkCollectionNodes 1, expected 8 ntoskrnl.c:1849: Test failed: report 1: got NumberInputButtonCaps 0, expected 13 ntoskrnl.c:1851: Test failed: report 1: got NumberInputValueCaps 57828, expected 7 ntoskrnl.c:1853: Test failed: report 1: got NumberInputDataIndices 34, expected 43 ntoskrnl.c:1856: Test failed: report 1: got NumberOutputDataIndices 16617, expected 0 ntoskrnl.c:1857: Test failed: report 1: got NumberFeatureButtonCaps 30502, expected 1 ntoskrnl.c:1858: Test failed: report 1: got NumberFeatureValueCaps 16616, expected 5 ntoskrnl.c:1860: Test failed: report 1: got NumberFeatureDataIndices 30502, expected 7 ntoskrnl.c:1864: Test failed: report 1: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1866: Test failed: report 1: got 0 collection nodes, expected 1 ntoskrnl.c:1872: Test failed: report 1: HidP_GetLinkCollectionNodes returned 0xc0110001 ntoskrnl.c:1873: Test failed: report 1: got 16 collection nodes, expected 1 ntoskrnl.c:1879: Test failed: report 1: collections[0]: got LinkUsage 0074, expected 0004 ntoskrnl.c:1880: Test failed: report 1: collections[0]: got LinkUsagePage 0076, expected 0001 ntoskrnl.c:1881: Test failed: report 1: collections[0]: got Parent 57360, expected 0 ntoskrnl.c:1882: Test failed: report 1: collections[0]: got NumberOfChildren 65, expected 5 ntoskrnl.c:1884: Test failed: report 1: collections[0]: got NextSibling 63371, expected 0 ntoskrnl.c:1886: Test failed: report 1: collections[0]: got FirstChild 29998, expected 7 ntoskrnl.c:1887: Test failed: report 1: collections[0]: got CollectionType 48, expected 1 ntoskrnl.c:1879: Test failed: report 1: collections[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1880: Test failed: report 1: collections[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1881: Test failed: report 1: collections[1]: got Parent 64188, expected 0 ntoskrnl.c:1882: Test failed: report 1: collections[1]: got NumberOfChildren 52, expected 0 ntoskrnl.c:1887: Test failed: report 1: collections[1]: got CollectionType 152, expected 2 ntoskrnl.c:1888: Test failed: report 1: collections[1]: got IsAlias 1, expected 0 ntoskrnl.c:1895: Test failed: report 1: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1897: Test failed: report 1: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1901: Test failed: report 1: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1910: Test failed: report 1: HidP_GetButtonCaps returned 0xc0110001 ntoskrnl.c:1911: Test failed: report 1: HidP_GetButtonCaps returned count 16, expected 0 ntoskrnl.c:1918: Test failed: report 1: button_caps[0]: got UsagePage 0000, expected 0009 ntoskrnl.c:1919: Test failed: report 1: button_caps[0]: got ReportID 0, expected 1 ntoskrnl.c:1922: Test failed: report 1: button_caps[0]: got BitField 0, expected 2 ntoskrnl.c:1924: Test failed: report 1: button_caps[0]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 1: button_caps[0]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 1: button_caps[0]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 1: button_caps[0]: got IsRange 0, expected 1 ntoskrnl.c:1934: Test failed: report 1: button_caps[0]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 1: button_caps[0]: got Range.UsageMin 0000, expected 0001 ntoskrnl.c:1938: Test failed: report 1: button_caps[0]: got Range.UsageMax 0000, expected 0008 ntoskrnl.c:1944: Test failed: report 1: button_caps[0]: got Range.DataIndexMin 0, expected 2 ntoskrnl.c:1946: Test failed: report 1: button_caps[0]: got Range.DataIndexMax 0, expected 9 ntoskrnl.c:1918: Test failed: report 1: button_caps[1]: got UsagePage 0000, expected 0009 ntoskrnl.c:1919: Test failed: report 1: button_caps[1]: got ReportID 0, expected 1 ntoskrnl.c:1922: Test failed: report 1: button_caps[1]: got BitField 0, expected 3 ntoskrnl.c:1924: Test failed: report 1: button_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 1: button_caps[1]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 1: button_caps[1]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 1: button_caps[1]: got IsRange 0, expected 1 ntoskrnl.c:1934: Test failed: report 1: button_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 1: button_caps[1]: got Range.UsageMin 0000, expected 0018 ntoskrnl.c:1938: Test failed: report 1: button_caps[1]: got Range.UsageMax 0000, expected 001f ntoskrnl.c:1944: Test failed: report 1: button_caps[1]: got Range.DataIndexMin 0, expected 10 ntoskrnl.c:1946: Test failed: report 1: button_caps[1]: got Range.DataIndexMax 0, expected 17 ntoskrnl.c:1918: Test failed: report 1: button_caps[2]: got UsagePage 0000, expected 0007 ntoskrnl.c:1919: Test failed: report 1: button_caps[2]: got ReportID 0, expected 1 ntoskrnl.c:1922: Test failed: report 1: button_caps[2]: got BitField 0, expected 508 ntoskrnl.c:1924: Test failed: report 1: button_caps[2]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 1: button_caps[2]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 1: button_caps[2]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1930: Test failed: report 1: button_caps[2]: got IsRange 0, expected 1 ntoskrnl.c:1936: Test failed: report 1: button_caps[2]: got Range.UsageMin 0000, expected 0008 ntoskrnl.c:1938: Test failed: report 1: button_caps[2]: got Range.UsageMax 0000, expected 000f ntoskrnl.c:1944: Test failed: report 1: button_caps[2]: got Range.DataIndexMin 0, expected 18 ntoskrnl.c:1946: Test failed: report 1: button_caps[2]: got Range.DataIndexMax 0, expected 25 ntoskrnl.c:1918: Test failed: report 1: button_caps[3]: got UsagePage 0000, expected 0009 ntoskrnl.c:1919: Test failed: report 1: button_caps[3]: got ReportID 0, expected 1 ntoskrnl.c:1922: Test failed: report 1: button_caps[3]: got BitField 0, expected 2 ntoskrnl.c:1924: Test failed: report 1: button_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:1926: Test failed: report 1: button_caps[3]: got LinkUsage 0000, expected 0004 ntoskrnl.c:1928: Test failed: report 1: button_caps[3]: got LinkUsagePage 0000, expected 0001 ntoskrnl.c:1934: Test failed: report 1: button_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:1936: Test failed: report 1: button_caps[3]: got Range.UsageMin 0000, expected 0020 ntoskrnl.c:1938: Test failed: report 1: button_caps[3]: got Range.UsageMax 0000, expected 0020 ntoskrnl.c:1944: Test failed: report 1: button_caps[3]: got Range.DataIndexMin 0, expected 26 ntoskrnl.c:1946: Test failed: report 1: button_caps[3]: got Range.DataIndexMax 0, expected 26 ntoskrnl.c:1953: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1955: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1959: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1968: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1969: Test failed: report 1: HidP_GetSpecificButtonCaps returned count 15, expected 0 ntoskrnl.c:1975: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1976: Test failed: report 1: HidP_GetSpecificButtonCaps returned count 15, expected 1 ntoskrnl.c:1982: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1983: Test failed: report 1: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1987: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1988: Test failed: report 1: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1992: Test failed: report 1: HidP_GetSpecificButtonCaps returned 0xc0110001 ntoskrnl.c:1993: Test failed: report 1: HidP_GetSpecificButtonCaps returned count 48879, expected 0 ntoskrnl.c:1998: Test failed: report 1: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2000: Test failed: report 1: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2004: Test failed: report 1: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2006: Test failed: report 1: HidP_GetValueCaps returned count 0, expected 57828 ntoskrnl.c:2012: Test failed: report 1: HidP_GetValueCaps returned 0xc0110001 ntoskrnl.c:2013: Test failed: report 1: HidP_GetValueCaps returned count 16, expected 57828 ntoskrnl.c:2020: Test failed: report 1: value_caps[0]: got UsagePage 3a43, expected 0001 ntoskrnl.c:2021: Test failed: report 1: value_caps[0]: got ReportID 92, expected 1 ntoskrnl.c:2022: Test failed: report 1: value_caps[0]: got IsAlias 87, expected 0 ntoskrnl.c:2024: Test failed: report 1: value_caps[0]: got BitField 28265, expected 2 ntoskrnl.c:2025: Test failed: report 1: value_caps[0]: got LinkCollection 28516, expected 1 ntoskrnl.c:2026: Test failed: report 1: value_caps[0]: got LinkUsage 7377, expected 0004 ntoskrnl.c:2027: Test failed: report 1: value_caps[0]: got LinkUsagePage 495c, expected 0001 ntoskrnl.c:2029: Test failed: report 1: value_caps[0]: got IsRange 78, expected 0 ntoskrnl.c:2030: Test failed: report 1: value_caps[0]: got IsStringRange 70, expected 0 ntoskrnl.c:2031: Test failed: report 1: value_caps[0]: got IsDesignatorRange 92, expected 0 ntoskrnl.c:2033: Test failed: report 1: value_caps[0]: got IsAbsolute 111, expected 1 ntoskrnl.c:2035: Test failed: report 1: value_caps[0]: got HasNull 101, expected 0 ntoskrnl.c:2037: Test failed: report 1: value_caps[0]: got BitSize 11830, expected 8 ntoskrnl.c:2039: Test failed: report 1: value_caps[0]: got ReportCount 28265, expected 1 ntoskrnl.c:2040: Test failed: report 1: value_caps[0]: got UnitsExp 2289580, expected 0 ntoskrnl.c:2041: Test failed: report 1: value_caps[0]: got Units 1997429636, expected 0 ntoskrnl.c:2043: Test failed: report 1: value_caps[0]: got LogicalMin 1997429683, expected -128 ntoskrnl.c:2045: Test failed: report 1: value_caps[0]: got LogicalMax 1999935557, expected 127 ntoskrnl.c:2047: Test failed: report 1: value_caps[0]: got PhysicalMax 3081132, expected 0 ntoskrnl.c:2049: Test failed: report 1: value_caps[0]: got Range.UsageMin 0000, expected 0031 ntoskrnl.c:2051: Test failed: report 1: value_caps[0]: got Range.UsageMax 002f, expected 0031 ntoskrnl.c:2052: Test failed: report 1: value_caps[0]: got Range.StringMin 336, expected 0 ntoskrnl.c:2053: Test failed: report 1: value_caps[0]: got Range.StringMax 47, expected 0 ntoskrnl.c:2054: Test failed: report 1: value_caps[0]: got Range.DesignatorMin 17, expected 0 ntoskrnl.c:2057: Test failed: report 1: value_caps[0]: got Range.DataIndexMin 34816, expected 0 ntoskrnl.c:2059: Test failed: report 1: value_caps[0]: got Range.DataIndexMax 57, expected 0 ntoskrnl.c:2020: Test failed: report 1: value_caps[1]: got UsagePage 0150, expected 0001 ntoskrnl.c:2021: Test failed: report 1: value_caps[1]: got ReportID 47, expected 1 ntoskrnl.c:2024: Test failed: report 1: value_caps[1]: got BitField 86, expected 2 ntoskrnl.c:2025: Test failed: report 1: value_caps[1]: got LinkCollection 0, expected 1 ntoskrnl.c:2026: Test failed: report 1: value_caps[1]: got LinkUsage 0180, expected 0004 ntoskrnl.c:2027: Test failed: report 1: value_caps[1]: got LinkUsagePage 002f, expected 0001 ntoskrnl.c:2033: Test failed: report 1: value_caps[1]: got IsAbsolute 0, expected 1 ntoskrnl.c:2035: Test failed: report 1: value_caps[1]: got HasNull 49, expected 0 ntoskrnl.c:2037: Test failed: report 1: value_caps[1]: got BitSize 0, expected 8 ntoskrnl.c:2039: Test failed: report 1: value_caps[1]: got ReportCount 34816, expected 1 ntoskrnl.c:2040: Test failed: report 1: value_caps[1]: got UnitsExp 3988976, expected 0 ntoskrnl.c:2043: Test failed: report 1: value_caps[1]: got LogicalMin 118, expected -128 ntoskrnl.c:2045: Test failed: report 1: value_caps[1]: got LogicalMax 0, expected 127 ntoskrnl.c:2046: Test failed: report 1: value_caps[1]: got PhysicalMin 69, expected 0 ntoskrnl.c:2047: Test failed: report 1: value_caps[1]: got PhysicalMax 3943960, expected 0 ntoskrnl.c:2049: Test failed: report 1: value_caps[1]: got Range.UsageMin 0076, expected 0030 ntoskrnl.c:2051: Test failed: report 1: value_caps[1]: got Range.UsageMax 7600, expected 0030 ntoskrnl.c:2052: Test failed: report 1: value_caps[1]: got Range.StringMin 61288, expected 0 ntoskrnl.c:2053: Test failed: report 1: value_caps[1]: got Range.StringMax 34, expected 0 ntoskrnl.c:2054: Test failed: report 1: value_caps[1]: got Range.DesignatorMin 62247, expected 0 ntoskrnl.c:2055: Test failed: report 1: value_caps[1]: got Range.DesignatorMax 30479, expected 0 ntoskrnl.c:2057: Test failed: report 1: value_caps[1]: got Range.DataIndexMin 0, expected 1 ntoskrnl.c:2059: Test failed: report 1: value_caps[1]: got Range.DataIndexMax 0, expected 1 ntoskrnl.c:2020: Test failed: report 1: value_caps[2]: got UsagePage 0002, expected 0009 ntoskrnl.c:2021: Test failed: report 1: value_caps[2]: got ReportID 0, expected 1 ntoskrnl.c:2022: Test failed: report 1: value_caps[2]: got IsAlias 2, expected 0 ntoskrnl.c:2024: Test failed: report 1: value_caps[2]: got BitField 11800, expected 2 ntoskrnl.c:2025: Test failed: report 1: value_caps[2]: got LinkCollection 60, expected 1 ntoskrnl.c:2026: Test failed: report 1: value_caps[2]: got LinkUsage 00ae, expected 0004 ntoskrnl.c:2027: Test failed: report 1: value_caps[2]: got LinkUsagePage ae00, expected 0001 ntoskrnl.c:2029: Test failed: report 1: value_caps[2]: got IsRange 104, expected 1 ntoskrnl.c:2030: Test failed: report 1: value_caps[2]: got IsStringRange 239, expected 0 ntoskrnl.c:2031: Test failed: report 1: value_caps[2]: got IsDesignatorRange 34, expected 0 ntoskrnl.c:2033: Test failed: report 1: value_caps[2]: got IsAbsolute 0, expected 1 ntoskrnl.c:2035: Test failed: report 1: value_caps[2]: got HasNull 36, expected 0 ntoskrnl.c:2039: Test failed: report 1: value_caps[2]: got ReportCount 2580, expected 1 ntoskrnl.c:2040: Test failed: report 1: value_caps[2]: got UnitsExp 2, expected 0 ntoskrnl.c:2041: Test failed: report 1: value_caps[2]: got Units 36, expected 0 ntoskrnl.c:2043: Test failed: report 1: value_caps[2]: got LogicalMin 5442068, expected 0 ntoskrnl.c:2045: Test failed: report 1: value_caps[2]: got LogicalMax 1985344143, expected 1 ntoskrnl.c:2046: Test failed: report 1: value_caps[2]: got PhysicalMin -1116892123, expected 0 ntoskrnl.c:2049: Test failed: report 1: value_caps[2]: got Range.UsageMin efb0, expected 0021 ntoskrnl.c:2052: Test failed: report 1: value_caps[2]: got Range.StringMin 62087, expected 0 ntoskrnl.c:2053: Test failed: report 1: value_caps[2]: got Range.StringMax 30293, expected 0 ntoskrnl.c:2054: Test failed: report 1: value_caps[2]: got Range.DesignatorMin 62095, expected 0 ntoskrnl.c:2055: Test failed: report 1: value_caps[2]: got Range.DesignatorMax 30293, expected 0 ntoskrnl.c:2057: Test failed: report 1: value_caps[2]: got Range.DataIndexMin 37897, expected 27 ntoskrnl.c:2059: Test failed: report 1: value_caps[2]: got Range.DataIndexMax 48493, expected 28 ntoskrnl.c:2020: Test failed: report 1: value_caps[3]: got UsagePage 0000, expected 0001 ntoskrnl.c:2021: Test failed: report 1: value_caps[3]: got ReportID 0, expected 1 ntoskrnl.c:2024: Test failed: report 1: value_caps[3]: got BitField 36, expected 2 ntoskrnl.c:2025: Test failed: report 1: value_caps[3]: got LinkCollection 0, expected 1 ntoskrnl.c:2026: Test failed: report 1: value_caps[3]: got LinkUsage 0500, expected 0004 ntoskrnl.c:2027: Test failed: report 1: value_caps[3]: got LinkUsagePage 765f, expected 0001 ntoskrnl.c:2033: Test failed: report 1: value_caps[3]: got IsAbsolute 0, expected 1 ntoskrnl.c:2037: Test failed: report 1: value_caps[3]: got BitSize 30303, expected 4 ntoskrnl.c:2039: Test failed: report 1: value_caps[3]: got ReportCount 36, expected 2 ntoskrnl.c:2040: Test failed: report 1: value_caps[3]: got UnitsExp 5442080, expected 0 ntoskrnl.c:2041: Test failed: report 1: value_caps[3]: got Units 2289644, expected 0 ntoskrnl.c:2043: Test failed: report 1: value_caps[3]: got LogicalMin 1985364273, expected 1 ntoskrnl.c:2045: Test failed: report 1: value_caps[3]: got LogicalMax 1, expected 8 ntoskrnl.c:2046: Test failed: report 1: value_caps[3]: got PhysicalMin 1985364229, expected 0 ntoskrnl.c:2047: Test failed: report 1: value_caps[3]: got PhysicalMax -1116892075, expected 0 ntoskrnl.c:2049: Test failed: report 1: value_caps[3]: got Range.UsageMin 0001, expected 0039 ntoskrnl.c:2051: Test failed: report 1: value_caps[3]: got Range.UsageMax 0000, expected 0039 ntoskrnl.c:2052: Test failed: report 1: value_caps[3]: got Range.StringMin 10528, expected 0 ntoskrnl.c:2053: Test failed: report 1: value_caps[3]: got Range.StringMax 30303, expected 0 ntoskrnl.c:2057: Test failed: report 1: value_caps[3]: got Range.DataIndexMin 36053, expected 29 ntoskrnl.c:2059: Test failed: report 1: value_caps[3]: got Range.DataIndexMax 30295, expected 29 ntoskrnl.c:2066: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2068: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2072: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2074: Test failed: report 1: HidP_GetSpecificValueCaps returned count 0, expected 57828 ntoskrnl.c:2081: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2082: Test failed: report 1: HidP_GetSpecificValueCaps returned count 12, expected 57828 ntoskrnl.c:2084: Test failed: report 1: got UsagePage 0001, expected 3a43 ntoskrnl.c:2084: Test failed: report 1: got ReportID 0, expected 92 ntoskrnl.c:2084: Test failed: report 1: got IsAlias 0, expected 87 ntoskrnl.c:2084: Test failed: report 1: got BitField 61372, expected 28265 ntoskrnl.c:2084: Test failed: report 1: got LinkCollection 34, expected 28516 ntoskrnl.c:2084: Test failed: report 1: got LinkUsage 16645, expected 29559 ntoskrnl.c:2084: Test failed: report 1: got LinkUsagePage 30294, expected 18780 ntoskrnl.c:2084: Test failed: report 1: got IsRange 224, expected 78 ntoskrnl.c:2084: Test failed: report 1: got IsStringRange 242, expected 70 ntoskrnl.c:2084: Test failed: report 1: got IsDesignatorRange 34, expected 92 ntoskrnl.c:2084: Test failed: report 1: got IsAbsolute 0, expected 111 ntoskrnl.c:2084: Test failed: report 1: got HasNull 213, expected 101 ntoskrnl.c:2084: Test failed: report 1: got BitSize 30295, expected 11830 ntoskrnl.c:2084: Test failed: report 1: got ReportCount 15025, expected 28265 ntoskrnl.c:2084: Test failed: report 1: got UnitsExp 1985378514, expected 2289580 ntoskrnl.c:2084: Test failed: report 1: got Units 1, expected 1997429636 ntoskrnl.c:2084: Test failed: report 1: got LogicalMin 2289684, expected 1997429683 ntoskrnl.c:2084: Test failed: report 1: got LogicalMax 1, expected 1999935557 ntoskrnl.c:2084: Test failed: report 1: got PhysicalMin 2290488, expected 0 ntoskrnl.c:2084: Test failed: report 1: got PhysicalMax 1985947936, expected 3081132 ntoskrnl.c:2084: Test failed: report 1: got Range.UsageMin f07c, expected 0000 ntoskrnl.c:2084: Test failed: report 1: got Range.UsageMax 0022, expected 002f ntoskrnl.c:2084: Test failed: report 1: got Range.DataIndexMin 10, expected 34816 ntoskrnl.c:2084: Test failed: report 1: got Range.DataIndexMax 0, expected 57 ntoskrnl.c:2084: Test failed: report 1: got Range.StringMin 62116, expected 336 ntoskrnl.c:2084: Test failed: report 1: got Range.StringMax 34, expected 47 ntoskrnl.c:2084: Test failed: report 1: got Range.DesignatorMin 51253, expected 17 ntoskrnl.c:2084: Test failed: report 1: got Range.DesignatorMax 30293, expected 0 ntoskrnl.c:2085: Test failed: report 1: got UsagePage 0001, expected 0150 ntoskrnl.c:2085: Test failed: report 1: got ReportID 0, expected 47 ntoskrnl.c:2085: Test failed: report 1: got BitField 53874, expected 86 ntoskrnl.c:2085: Test failed: report 1: got LinkCollection 30293, expected 0 ntoskrnl.c:2085: Test failed: report 1: got LinkUsage 0, expected 384 ntoskrnl.c:2085: Test failed: report 1: got LinkUsagePage 0, expected 47 ntoskrnl.c:2085: Test failed: report 1: got IsRange 32, expected 0 ntoskrnl.c:2085: Test failed: report 1: got IsStringRange 41, expected 0 ntoskrnl.c:2085: Test failed: report 1: got IsDesignatorRange 95, expected 0 ntoskrnl.c:2085: Test failed: report 1: got IsAbsolute 118, expected 0 ntoskrnl.c:2085: Test failed: report 1: got HasNull 24, expected 49 ntoskrnl.c:2085: Test failed: report 1: got BitSize 30293, expected 0 ntoskrnl.c:2085: Test failed: report 1: got ReportCount 51253, expected 34816 ntoskrnl.c:2085: Test failed: report 1: got UnitsExp 1985335922, expected 3988976 ntoskrnl.c:2085: Test failed: report 1: got LogicalMin 1985947936, expected 118 ntoskrnl.c:2085: Test failed: report 1: got PhysicalMin 1985947936, expected 69 ntoskrnl.c:2085: Test failed: report 1: got PhysicalMax 0, expected 3943960 ntoskrnl.c:2086: Test failed: report 1: got UsagePage 07d0, expected 0002 ntoskrnl.c:2086: Test failed: report 1: got ReportID 83, expected 0 ntoskrnl.c:2086: Test failed: report 1: got IsAlias 0, expected 2 ntoskrnl.c:2086: Test failed: report 1: got BitField 10497, expected 11800 ntoskrnl.c:2086: Test failed: report 1: got LinkCollection 30303, expected 60 ntoskrnl.c:2086: Test failed: report 1: got LinkUsage 0, expected 174 ntoskrnl.c:2086: Test failed: report 1: got LinkUsagePage 0, expected 44544 ntoskrnl.c:2086: Test failed: report 1: got IsRange 0, expected 104 ntoskrnl.c:2086: Test failed: report 1: got IsStringRange 0, expected 239 ntoskrnl.c:2086: Test failed: report 1: got IsDesignatorRange 0, expected 34 ntoskrnl.c:2086: Test failed: report 1: got HasNull 0, expected 36 ntoskrnl.c:2086: Test failed: report 1: got ReportCount 62197, expected 2580 ntoskrnl.c:2086: Test failed: report 1: got UnitsExp 2290488, expected 2 ntoskrnl.c:2086: Test failed: report 1: got Units 10, expected 36 ntoskrnl.c:2086: Test failed: report 1: got LogicalMin 4318908, expected 5442068 ntoskrnl.c:2086: Test failed: report 1: got LogicalMax -1, expected 1985344143 ntoskrnl.c:2086: Test failed: report 1: got PhysicalMin 4321679, expected -1116892123 ntoskrnl.c:2087: Test failed: report 1: got UsagePage ffff, expected 0000 ntoskrnl.c:2087: Test failed: report 1: got ReportID 255, expected 0 ntoskrnl.c:2087: Test failed: report 1: got IsAlias 255, expected 0 ntoskrnl.c:2087: Test failed: report 1: got BitField 99, expected 36 ntoskrnl.c:2087: Test failed: report 1: got LinkCollection 117, expected 0 ntoskrnl.c:2087: Test failed: report 1: got LinkUsage 0, expected 1280 ntoskrnl.c:2087: Test failed: report 1: got LinkUsagePage 0, expected 30303 ntoskrnl.c:2087: Test failed: report 1: got IsRange 110, expected 0 ntoskrnl.c:2087: Test failed: report 1: got IsDesignatorRange 116, expected 0 ntoskrnl.c:2087: Test failed: report 1: got HasNull 115, expected 0 ntoskrnl.c:2087: Test failed: report 1: got BitSize 0, expected 30303 ntoskrnl.c:2087: Test failed: report 1: got ReportCount 0, expected 36 ntoskrnl.c:2087: Test failed: report 1: got UnitsExp 0, expected 5442080 ntoskrnl.c:2087: Test failed: report 1: got Units 0, expected 2289644 ntoskrnl.c:2087: Test failed: report 1: got LogicalMin 0, expected 1985364273 ntoskrnl.c:2087: Test failed: report 1: got LogicalMax 0, expected 1 ntoskrnl.c:2087: Test failed: report 1: got PhysicalMin 0, expected 1985364229 ntoskrnl.c:2087: Test failed: report 1: got PhysicalMax 0, expected -1116892075 ntoskrnl.c:2092: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2096: Test failed: report 1: got UsagePage 0001, expected 0000 ntoskrnl.c:2099: Test failed: report 1: got BitField 61372, expected 36 ntoskrnl.c:2100: Test failed: report 1: got LinkCollection 34, expected 0 ntoskrnl.c:2101: Test failed: report 1: got LinkUsage 4105, expected 0500 ntoskrnl.c:2102: Test failed: report 1: got LinkUsagePage 7656, expected 765f ntoskrnl.c:2104: Test failed: report 1: got IsRange 224, expected 0 ntoskrnl.c:2105: Test failed: report 1: got IsStringRange 242, expected 0 ntoskrnl.c:2106: Test failed: report 1: got IsDesignatorRange 34, expected 0 ntoskrnl.c:2108: Test failed: report 1: got HasNull 213, expected 0 ntoskrnl.c:2110: Test failed: report 1: got BitSize 30295, expected 30303 ntoskrnl.c:2111: Test failed: report 1: got ReportCount 15025, expected 36 ntoskrnl.c:2112: Test failed: report 1: got UnitsExp 1985378514, expected 5442080 ntoskrnl.c:2113: Test failed: report 1: got Units 1, expected 2289644 ntoskrnl.c:2115: Test failed: report 1: got LogicalMin 2289684, expected 1985364273 ntoskrnl.c:2118: Test failed: report 1: got PhysicalMin 2290488, expected 1985364229 ntoskrnl.c:2119: Test failed: report 1: got PhysicalMax 1985947936, expected -1116892075 ntoskrnl.c:2121: Test failed: report 1: got Range.UsageMin f07c, expected 0001 ntoskrnl.c:2122: Test failed: report 1: got Range.UsageMax 0022, expected 0000 ntoskrnl.c:2123: Test failed: report 1: got Range.StringMin 62116, expected 10528 ntoskrnl.c:2124: Test failed: report 1: got Range.StringMax 34, expected 30303 ntoskrnl.c:2125: Test failed: report 1: got Range.DesignatorMin 51253, expected 0 ntoskrnl.c:2126: Test failed: report 1: got Range.DesignatorMax 30293, expected 0 ntoskrnl.c:2128: Test failed: report 1: got Range.DataIndexMin 10, expected 36053 ntoskrnl.c:2130: Test failed: report 1: got Range.DataIndexMax 0, expected 30295 ntoskrnl.c:2135: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2136: Test failed: report 1: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2140: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2141: Test failed: report 1: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2145: Test failed: report 1: HidP_GetSpecificValueCaps returned 0xc0110001 ntoskrnl.c:2146: Test failed: report 1: HidP_GetSpecificValueCaps returned count 57005, expected 0 ntoskrnl.c:2151: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2153: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2155: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2158: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2163: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2169: Test failed: report 1: unexpected report data ntoskrnl.c:2174: Test failed: report 1: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2179: Test failed: report 1: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2182: Test failed: report 1: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2187: Test failed: report 1: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2192: Test failed: report 1: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2196: Test failed: report 1: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2202: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2207: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2209: Test failed: report 1: got value deadbeef, expected 0x80 ntoskrnl.c:2214: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2216: Test failed: report 1: got value deadbeef, expected 0xffffff80 ntoskrnl.c:2222: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2227: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2229: Test failed: report 1: got value deadbeef, expected 0x7f ntoskrnl.c:2235: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2240: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2242: Test failed: report 1: got value deadbeef, expected 0 ntoskrnl.c:2248: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2253: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2255: Test failed: report 1: got value deadbeef, expected 0 ntoskrnl.c:2260: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2262: Test failed: report 1: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2268: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2273: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2275: Test failed: report 1: got value deadbeef, expected 0x7fffffff ntoskrnl.c:2281: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2286: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2288: Test failed: report 1: got value deadbeef, expected 0x80000000 ntoskrnl.c:2294: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2299: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2301: Test failed: report 1: got value deadbeef, expected 0 ntoskrnl.c:2307: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2312: Test failed: report 1: HidP_GetScaledUsageValue returned 0xc0110001 ntoskrnl.c:2314: Test failed: report 1: got value deadbeef, expected 0 ntoskrnl.c:2321: Test failed: report 1: HidP_MaxUsageListLength(HidP_Input, 0) returned 0, expected 42 ntoskrnl.c:2324: Test failed: report 1: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_BUTTON) returned 0, expected 32 ntoskrnl.c:2326: Test failed: report 1: HidP_MaxUsageListLength(HidP_Input, HID_USAGE_PAGE_LED) returned 0, expected 8 ntoskrnl.c:2329: Test failed: report 1: HidP_MaxUsageListLength(HidP_Feature, HID_USAGE_PAGE_BUTTON) returned 0, expected 8 ntoskrnl.c:2338: Test failed: report 1: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2345: Test failed: report 1: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2352: Test failed: report 1: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2359: Test failed: report 1: HidP_SetUsages returned 0xc0110001 ntoskrnl.c:2364: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2370: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2377: Test failed: report 1: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2379: Test failed: report 1: got usage count 1, expected 2 ntoskrnl.c:2385: Test failed: report 1: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2387: Test failed: report 1: got usage count 16, expected 2 ntoskrnl.c:2389: Test failed: report 1: got usages[0] cdcd, expected 4 ntoskrnl.c:2391: Test failed: report 1: got usages[1] cdcd, expected 6 ntoskrnl.c:2398: Test failed: report 1: HidP_GetUsages returned 0xc0110001 ntoskrnl.c:2400: Test failed: report 1: got usage count 16, expected 2 ntoskrnl.c:2402: Test failed: report 1: got usages[0] cdcd, expected 6 ntoskrnl.c:2404: Test failed: report 1: got usages[1] cdcd, expected 4 ntoskrnl.c:2411: Test failed: report 1: HidP_GetUsagesEx returned 0xc0110001 ntoskrnl.c:2413: Test failed: report 1: got usage count 16, expected 4 ntoskrnl.c:2415: Test failed: report 1: got usage_and_pages[0] UsagePage cdcd, expected 9 ntoskrnl.c:2418: Test failed: report 1: got usage_and_pages[1] UsagePage cdcd, expected 9 ntoskrnl.c:2421: Test failed: report 1: got usage_and_pages[2] UsagePage cdcd, expected 8 ntoskrnl.c:2424: Test failed: report 1: got usage_and_pages[3] UsagePage cdcd, expected 8 ntoskrnl.c:2427: Test failed: report 1: got usage_and_pages[0] Usage cdcd, expected 4 ntoskrnl.c:2430: Test failed: report 1: got usage_and_pages[1] Usage cdcd, expected 6 ntoskrnl.c:2433: Test failed: report 1: got usage_and_pages[2] Usage cdcd, expected 6 ntoskrnl.c:2436: Test failed: report 1: got usage_and_pages[3] Usage cdcd, expected 4 ntoskrnl.c:2442: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2447: Test failed: report 1: HidP_InitializeReportForID returned 0xc0110001 ntoskrnl.c:2453: Test failed: report 1: unexpected report data ntoskrnl.c:2460: Test failed: report 1: HID_USAGE_HAPTICS_WAVEFORM_LIST collection not found ntoskrnl.c:2471: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2476: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2482: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2489: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2494: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2499: Test failed: report 1: HidP_SetUsageValue returned 0xc0110001 ntoskrnl.c:2507: Test failed: report 1: unexpected report data ntoskrnl.c:2514: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2518: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2523: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2529: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2534: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2539: Test failed: report 1: HidP_GetUsageValue returned 0xc0110001 ntoskrnl.c:2541: Test failed: report 1: got value deadbeef, expected 0x1005 ntoskrnl.c:2548: Test failed: report 1: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2552: Test failed: report 1: HidP_SetUsageValueArray returned 0xc0110001 ntoskrnl.c:2554: Test failed: report 1: unexpected report data ntoskrnl.c:2559: Test failed: report 1: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2562: Test failed: report 1: HidP_GetUsageValueArray returned 0xc0110001 ntoskrnl.c:2565: Test failed: report 1: unexpected report value ntoskrnl.c:2628: Test failed: report 1: got 0xc0000034 ntoskrnl.c:2715: Test failed: failed to open service, error 1060 ntoskrnl.c:294: Test failed: expected SERVICE_STOPPED, got 2284856
Report validation errors: ntoskrnl.exe:ntoskrnl prints too much data (70282 bytes)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 9b17e36c0ea..64b7205debd 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1814,6 +1814,18 @@ static void test_hidp(HANDLE file, int report_id) .CollectionType = 2, }, }; + static const HIDP_DATA expect_data[] = + { + { .DataIndex = 0, }, + { .DataIndex = 1, }, + { .DataIndex = 5, .RawValue = 1, }, + { .DataIndex = 7, .RawValue = 1, }, + { .DataIndex = 30, }, + { .DataIndex = 31, }, + { .DataIndex = 32, .RawValue = 0xfeedcafe, }, + { .DataIndex = 37, .RawValue = 1, }, + { .DataIndex = 39, .RawValue = 1, }, + };
HIDP_LINK_COLLECTION_NODE collections[16]; PHIDP_PREPARSED_DATA preparsed_data; @@ -1823,6 +1835,7 @@ static void test_hidp(HANDLE file, int report_id) char buffer[200], report[200]; DWORD collection_count; DWORD waveform_list; + HIDP_DATA data[32]; USAGE usages[16]; NTSTATUS status; HIDP_CAPS caps; @@ -2436,6 +2449,36 @@ static void test_hidp(HANDLE file, int report_id) ok(usage_and_pages[3].Usage == 4, "got usage_and_pages[3] Usage %x, expected %x\n", usage_and_pages[3].Usage, 4);
+ value = HidP_MaxDataListLength(HidP_Feature + 1, preparsed_data); + ok(value == 0, "HidP_MaxDataListLength(HidP_Feature + 1) returned %d, expected %d\n", value, 0); + value = HidP_MaxDataListLength(HidP_Input, preparsed_data); + todo_wine + ok(value == 50, "HidP_MaxDataListLength(HidP_Input) returned %d, expected %d\n", value, 50); + value = HidP_MaxDataListLength(HidP_Output, preparsed_data); + ok(value == 0, "HidP_MaxDataListLength(HidP_Output) returned %d, expected %d\n", value, 0); + value = HidP_MaxDataListLength(HidP_Feature, preparsed_data); + ok(value == 13, "HidP_MaxDataListLength(HidP_Feature) returned %d, expected %d\n", value, 13); + + value = 1; + status = HidP_GetData(HidP_Input, data, &value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetData returned %#x\n", status); + todo_wine + ok(value == 9, "got data count %d, expected %d\n", value, 9); + memset(data, 0, sizeof(data)); + status = HidP_GetData(HidP_Input, data, &value, preparsed_data, report, caps.InputReportByteLength); + todo_wine_if(report_id) + ok(status == HIDP_STATUS_SUCCESS, "HidP_GetData returned %#x\n", status); + if (status == HIDP_STATUS_SUCCESS) for (i = 0; i < ARRAY_SIZE(expect_data); ++i) + { + winetest_push_context("data[%d]", i); + todo_wine_if(i >= 4) + check_member(data[i], expect_data[i], "%d", DataIndex); + todo_wine_if(i == 6 || i == 7 || i == 8) + check_member(data[i], expect_data[i], "%d", RawValue); + winetest_pop_context(); + } + memset(report, 0xcd, sizeof(report)); status = HidP_InitializeReportForID(HidP_Feature, 3, preparsed_data, report, caps.FeatureReportByteLength); todo_wine_if(!report_id)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92354
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1236: Test failed: got 0 bus arrival messages ntoskrnl.c:1252: Test failed: got 0 bus arrival messages
=== w864 (64 bit report) ===
Report validation errors: ntoskrnl.exe:ntoskrnl crashed (c0000374)