From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 4 +-- dlls/user32/input.c | 45 ++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index ff93cfc98ec..c4521ed652a 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1400,7 +1400,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara if (IsEqualGUID(&iface->dbcc_classguid, &bus_class)) { ++got_bus_arrival; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\ROOT#WINETEST#0#{deadbeef-29ef-4538-a5fd-b69573a362c1}"), + ok(!strcmp(iface->dbcc_name, "\\?\ROOT#WINETEST#0#{deadbeef-29ef-4538-a5fd-b69573a362c1}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) @@ -1428,7 +1428,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara if (IsEqualGUID(&iface->dbcc_classguid, &bus_class)) { ++got_bus_removal; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\ROOT#WINETEST#0#{deadbeef-29ef-4538-a5fd-b69573a362c1}"), + ok(!strcmp(iface->dbcc_name, "\\?\ROOT#WINETEST#0#{deadbeef-29ef-4538-a5fd-b69573a362c1}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 3b0a13842c8..f1cbad4f31b 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -495,12 +495,51 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout ) }
-static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +static DWORD CALLBACK devnotify_windowW_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) { SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); return 0; }
+static DWORD CALLBACK devnotify_windowA_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +{ + if (flags & 0x8000) + { + switch (header->dbch_devicetype) + { + case DBT_DEVTYP_DEVICEINTERFACE: + { + const DEV_BROADCAST_DEVICEINTERFACE_W *ifaceW = (const DEV_BROADCAST_DEVICEINTERFACE_W *)header; + size_t lenW = wcslen( ifaceW->dbcc_name ); + DEV_BROADCAST_DEVICEINTERFACE_A *ifaceA; + DWORD lenA; + + if (!(ifaceA = malloc( offsetof(DEV_BROADCAST_DEVICEINTERFACE_A, dbcc_name[lenW * 3 + 1]) ))) + return FALSE; + lenA = WideCharToMultiByte( CP_ACP, 0, ifaceW->dbcc_name, lenW + 1, + ifaceA->dbcc_name, lenW * 3 + 1, NULL, NULL ); + + ifaceA->dbcc_size = offsetof(DEV_BROADCAST_DEVICEINTERFACE_A, dbcc_name[lenA + 1]); + ifaceA->dbcc_devicetype = ifaceW->dbcc_devicetype; + ifaceA->dbcc_reserved = ifaceW->dbcc_reserved; + ifaceA->dbcc_classguid = ifaceW->dbcc_classguid; + SendMessageTimeoutA(handle, WM_DEVICECHANGE, flags, (LPARAM)ifaceA, SMTO_ABORTIFHUNG, 2000, NULL); + free( ifaceA ); + break; + } + + default: + FIXME( "unimplemented W to A mapping for %#lx\n", header->dbch_devicetype ); + /* fall through */ + case DBT_DEVTYP_HANDLE: + case DBT_DEVTYP_OEM: + SendMessageTimeoutA(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); + } + } + + return 0; +} + static DWORD CALLBACK devnotify_service_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) { FIXME("Support for service handles is not yet implemented!\n"); @@ -580,8 +619,10 @@ HDEVNOTIFY WINAPI RegisterDeviceNotificationW( HANDLE handle, void *filter, DWOR
if (flags & DEVICE_NOTIFY_SERVICE_HANDLE) details.cb = devnotify_service_callback; + else if (IsWindowUnicode( handle )) + details.cb = devnotify_windowW_callback; else - details.cb = devnotify_window_callback; + details.cb = devnotify_windowA_callback;
return I_ScRegisterDeviceNotification( &details, filter, 0 ); }
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ntoskrnl.exe/tests/driver_pnp.c | 9 ++++++++- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 22 +++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver_pnp.c b/dlls/ntoskrnl.exe/tests/driver_pnp.c index 9a965f584cd..629f1eda205 100644 --- a/dlls/ntoskrnl.exe/tests/driver_pnp.c +++ b/dlls/ntoskrnl.exe/tests/driver_pnp.c @@ -178,7 +178,7 @@ static NTSTATUS fdo_pnp(IRP *irp)
static NTSTATUS query_id(struct device *device, IRP *irp, BUS_QUERY_ID_TYPE type) { - static const WCHAR device_id[] = L"wine\test"; + static const WCHAR device_id[] = L"Wine\Test"; WCHAR *id = NULL;
irp->IoStatus.Information = 0; @@ -256,6 +256,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device_obj, IRP *irp)
case IRP_MN_START_DEVICE: { + static const WCHAR expect_symlink[] = L"\??\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"; static const LARGE_INTEGER wait_time = {.QuadPart = -500 * 10000}; POWER_STATE state = {.DeviceState = PowerDeviceD0}; NTSTATUS status; @@ -267,6 +268,12 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device_obj, IRP *irp)
status = IoRegisterDeviceInterface(device_obj, &child_class, NULL, &device->child_symlink); ok(!status, "Failed to register interface, status %#lx.\n", status); + ok(device->child_symlink.Length == sizeof(expect_symlink) - sizeof(WCHAR), "Expected length %Iu, got %u.\n", + sizeof(expect_symlink) - sizeof(WCHAR), device->child_symlink.Length); + ok(device->child_symlink.MaximumLength == sizeof(expect_symlink), "Expected length %Iu, got %u.\n", + sizeof(expect_symlink), device->child_symlink.MaximumLength); + todo_wine ok(!memcmp(device->child_symlink.Buffer, expect_symlink, device->child_symlink.Length), + "Got symlink "%ls".\n", device->child_symlink.Buffer);
IoSetDeviceInterfaceState(&device->child_symlink, TRUE);
diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c4521ed652a..c5362e3fb2b 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1406,7 +1406,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) { ++got_child_arrival; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\wine#test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), + todo_wine ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } break; @@ -1434,7 +1434,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) { ++got_child_removal; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\wine#test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), + todo_wine ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } break; @@ -1506,7 +1506,7 @@ static void test_pnp_devices(void)
ret = SetupDiGetDeviceInstanceIdA(set, &device, buffer, sizeof(buffer), NULL); ok(ret, "failed to get device ID, error %#lx\n", GetLastError()); - ok(!strcasecmp(buffer, "root\winetest\0"), "got ID %s\n", debugstr_a(buffer)); + ok(!strcmp(buffer, "ROOT\WINETEST\0"), "got ID %s\n", debugstr_a(buffer));
ret = SetupDiEnumDeviceInterfaces(set, NULL, &control_class, 0, &iface); ok(ret, "failed to get interface, error %#lx\n", GetLastError()); @@ -1517,7 +1517,7 @@ static void test_pnp_devices(void) iface_detail->cbSize = sizeof(*iface_detail); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, iface_detail, sizeof(buffer), NULL, NULL); ok(ret, "failed to get interface path, error %#lx\n", GetLastError()); - ok(!strcasecmp(iface_detail->DevicePath, "\\?\root#winetest#0#{deadbeef-29ef-4538-a5fd-b69573a362c0}"), + ok(!strcmp(iface_detail->DevicePath, "\\?\root#winetest#0#{deadbeef-29ef-4538-a5fd-b69573a362c0}"), "wrong path %s\n", debugstr_a(iface_detail->DevicePath));
SetupDiDestroyDeviceInfoList(set); @@ -1614,7 +1614,7 @@ static void test_pnp_devices(void)
ret = SetupDiGetDeviceInstanceIdA(set, &device, buffer, sizeof(buffer), NULL); ok(ret, "failed to get device ID, error %#lx\n", GetLastError()); - ok(!strcasecmp(buffer, "wine\test\1"), "got ID %s\n", debugstr_a(buffer)); + ok(!strcmp(buffer, "WINE\TEST\1"), "got ID %s\n", debugstr_a(buffer));
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CAPABILITIES, &type, (BYTE *)&dword, sizeof(dword), NULL); @@ -1680,6 +1680,18 @@ static void test_pnp_devices(void) ok(!strcmp(buffer, "\Device\winetest_pnp_1"), "got PDO name %s\n", debugstr_a(buffer)); }
+ ret = SetupDiEnumDeviceInterfaces(set, NULL, &child_class, 0, &iface); + ok(ret, "failed to get interface, error %#lx\n", GetLastError()); + ok(IsEqualGUID(&iface.InterfaceClassGuid, &child_class), + "wrong class %s\n", debugstr_guid(&iface.InterfaceClassGuid)); + ok(iface.Flags == SPINT_ACTIVE, "got flags %#lx\n", iface.Flags); + + iface_detail->cbSize = sizeof(*iface_detail); + ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, iface_detail, sizeof(buffer), NULL, NULL); + ok(ret, "failed to get interface path, error %#lx\n", GetLastError()); + ok(!strcmp(iface_detail->DevicePath, "\\?\wine#test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), + "wrong path %s\n", debugstr_a(iface_detail->DevicePath)); + SetupDiDestroyDeviceInfoList(set);
RtlInitUnicodeString(&string, L"\Device\winetest_pnp_1");
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ntoskrnl.exe/pnp.c | 40 ++++++++++++++++------------ dlls/ntoskrnl.exe/tests/driver_pnp.c | 2 +- 2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 7c77a9a7145..36ceeac8dae 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -883,13 +883,12 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla SP_DEVICE_INTERFACE_DATA sp_iface = {sizeof(sp_iface)}; SP_DEVINFO_DATA sp_device = {sizeof(sp_device)}; WCHAR device_instance_id[MAX_DEVICE_ID_LEN]; - SP_DEVICE_INTERFACE_DETAIL_DATA_W *data; NTSTATUS status = STATUS_SUCCESS; UNICODE_STRING device_path; struct device_interface *iface; struct wine_rb_entry *entry; - DWORD required; HDEVINFO set; + WCHAR *p;
TRACE("device %p, class_guid %s, refstr %s, symbolic_link %p.\n", device, debugstr_guid(class_guid), debugstr_us(refstr), symbolic_link); @@ -910,22 +909,31 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla if (!SetupDiCreateDeviceInterfaceW( set, &sp_device, class_guid, refstr ? refstr->Buffer : NULL, 0, &sp_iface )) return STATUS_UNSUCCESSFUL;
- required = 0; - SetupDiGetDeviceInterfaceDetailW( set, &sp_iface, NULL, 0, &required, NULL ); - if (required == 0) return STATUS_UNSUCCESSFUL; + /* setupapi mangles the case; construct the interface path manually. */
- data = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, required ); - data->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W); + device_path.Length = (4 + wcslen( device_instance_id ) + 1 + 38) * sizeof(WCHAR); + if (refstr) + device_path.Length += sizeof(WCHAR) + refstr->Length; + device_path.MaximumLength = device_path.Length + sizeof(WCHAR);
- if (!SetupDiGetDeviceInterfaceDetailW( set, &sp_iface, data, required, NULL, NULL )) + device_path.Buffer = RtlAllocateHeap( GetProcessHeap(), 0, device_path.MaximumLength ); + swprintf( device_path.Buffer, device_path.MaximumLength / sizeof(WCHAR), + L"\??\%s#{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + device_instance_id, class_guid->Data1, class_guid->Data2, class_guid->Data3, + class_guid->Data4[0], class_guid->Data4[1], class_guid->Data4[2], class_guid->Data4[3], + class_guid->Data4[4], class_guid->Data4[5], class_guid->Data4[6], class_guid->Data4[7] ); + for (p = device_path.Buffer + 4; *p; p++) { - HeapFree( GetProcessHeap(), 0, data ); - return STATUS_UNSUCCESSFUL; + if (*p == '\') + *p = '#'; + } + if (refstr) + { + *p++ = '\'; + wcscpy( p, refstr->Buffer ); }
- data->DevicePath[1] = '?'; - TRACE("Returning path %s.\n", debugstr_w(data->DevicePath)); - RtlCreateUnicodeString( &device_path, data->DevicePath); + TRACE("Returning path %s.\n", debugstr_us(&device_path));
entry = wine_rb_get( &device_interfaces, &device_path ); if (entry) @@ -937,7 +945,7 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla else { iface = heap_alloc_zero( sizeof(struct device_interface) ); - RtlCreateUnicodeString(&iface->symbolic_link, data->DevicePath); + RtlDuplicateUnicodeString( 1, &device_path, &iface->symbolic_link ); if (wine_rb_put( &device_interfaces, &iface->symbolic_link, &iface->entry )) ERR("Failed to insert interface %s into tree.\n", debugstr_us(&iface->symbolic_link)); } @@ -945,9 +953,7 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla iface->device = device; iface->interface_class = *class_guid; if (symbolic_link) - RtlCreateUnicodeString( symbolic_link, data->DevicePath); - - HeapFree( GetProcessHeap(), 0, data ); + RtlDuplicateUnicodeString( 1, &device_path, symbolic_link );
RtlFreeUnicodeString( &device_path );
diff --git a/dlls/ntoskrnl.exe/tests/driver_pnp.c b/dlls/ntoskrnl.exe/tests/driver_pnp.c index 629f1eda205..b7f1b67ab40 100644 --- a/dlls/ntoskrnl.exe/tests/driver_pnp.c +++ b/dlls/ntoskrnl.exe/tests/driver_pnp.c @@ -272,7 +272,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device_obj, IRP *irp) sizeof(expect_symlink) - sizeof(WCHAR), device->child_symlink.Length); ok(device->child_symlink.MaximumLength == sizeof(expect_symlink), "Expected length %Iu, got %u.\n", sizeof(expect_symlink), device->child_symlink.MaximumLength); - todo_wine ok(!memcmp(device->child_symlink.Buffer, expect_symlink, device->child_symlink.Length), + ok(!memcmp(device->child_symlink.Buffer, expect_symlink, device->child_symlink.Length), "Got symlink "%ls".\n", device->child_symlink.Buffer);
IoSetDeviceInterfaceState(&device->child_symlink, TRUE);
From: Zebediah Figura zfigura@codeweavers.com
This reverts commit c489356d0b5bf01f2a09f6df8f5a5b9b1894fb17. --- dlls/ntoskrnl.exe/pnp.c | 8 +------- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 36ceeac8dae..76700de0b7c 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -727,11 +727,11 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable
size_t namelen = name->Length / sizeof(WCHAR); DEV_BROADCAST_DEVICEINTERFACE_W *broadcast; - WCHAR *path, *refstr, *p, *upper_end; struct device_interface *iface; HANDLE iface_key, control_key; OBJECT_ATTRIBUTES attr = {0}; struct wine_rb_entry *entry; + WCHAR *path, *refstr, *p; UNICODE_STRING string; DWORD data = enable; NTSTATUS ret; @@ -817,12 +817,6 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable broadcast->dbcc_classguid = iface->interface_class; lstrcpynW( broadcast->dbcc_name, name->Buffer, namelen + 1 ); if (namelen > 1) broadcast->dbcc_name[1] = '\'; - - upper_end = wcschr( broadcast->dbcc_name, '#' ); - if (upper_end) upper_end = wcschr( upper_end + 1, '#' ); - while (upper_end && upper_end-- != broadcast->dbcc_name) - *upper_end = towupper( *upper_end ); - send_devicechange( enable ? DBT_DEVICEARRIVAL : DBT_DEVICEREMOVECOMPLETE, broadcast, len ); heap_free( broadcast ); } diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c5362e3fb2b..859dab4b3a9 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1406,7 +1406,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) { ++got_child_arrival; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), + ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } break; @@ -1434,7 +1434,7 @@ static LRESULT WINAPI device_notify_proc(HWND window, UINT message, WPARAM wpara else if (IsEqualGUID(&iface->dbcc_classguid, &child_class)) { ++got_child_removal; - todo_wine ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), + ok(!strcmp(iface->dbcc_name, "\\?\Wine#Test#1#{deadbeef-29ef-4538-a5fd-b69573a362c2}"), "got name %s\n", debugstr_a(iface->dbcc_name)); } break;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129371
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1505: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1513: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1515: Test failed: got flags 0 ntoskrnl.c:1519: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1520: Test failed: wrong path "x\x19)" ntoskrnl.c:1526: Test failed: got error 123 ntoskrnl.c:1547: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1570: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1572: Test failed: got flags 0 ntoskrnl.c:1586: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1640: Test failed: got type 488 ntoskrnl.c:1655: Test failed: got type 488 ntoskrnl.c:1656: Test failed: got size 1967527537 ntoskrnl.c:1657: Test failed: got hardware IDs "\x05\x00\x00\x00x\x19)\x00s\x00e\x00r\x00s\x00\\x00w\x00\x04\x00\x00\x00e\x00t\x00e\x00s\x00\x04\x00\x00\x00|\xf3"\x00\x00\x00\x00\x00R\x00O\x00O\x00T\x00\\x00W\x00I\x00N\x00E\x00T\x00E\x00S\x00T\x00\\x000\x00\x00\x00i\x00n\x00e\x00t\x00e\x00s\x00t\x00.\x00i\x00n\x00f\x00\x00\x00\x00\x00"... ntoskrnl.c:1663: Test failed: got type 488 ntoskrnl.c:1664: Test failed: got size 1967527537 ntoskrnl.c:1665: Test failed: got container ID L"\5c22\3078\5c35\3078\5c30\3078\5c30\3078\7830\785c\3931\5c29\3078\7330\785c\3030\5c65\3078\7230\785c\3030\5c73\3078\5c30\5c5c\3078\7730\785c\3030\785c\3430\785c\3030\785c\3030\785c\3030\5c65\3078\7430\785c\3030\5c65\3078\7330\785c\3030\785c\3430\785c\3030\785c\3030\785c\3030\5c7c\6678\5c33"... ntoskrnl.c:1670: Test failed: got type 488 ntoskrnl.c:1671: Test failed: got size 1967527537 ntoskrnl.c:1672: Test failed: got compatible IDs "\x05\x00\x00\x00x\x19)\x00s\x00e\x00r\x00s\x00\\x00w\x00\x04\x00\x00\x00e\x00t\x00e\x00s\x00\x04\x00\x00\x00|\xf3"\x00\x00\x00\x00\x00R\x00O\x00O\x00T\x00\\x00W\x00I\x00N\x00E\x00T\x00E\x00S\x00T\x00\\x000\x00\x00\x00i\x00n\x00e\x00t\x00e\x00s\x00t\x00.\x00i\x00n\x00f\x00\x00\x00\x00\x00"... ntoskrnl.c:1685: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1687: Test failed: got flags 0 ntoskrnl.c:1691: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1692: Test failed: wrong path "x\x19)" ntoskrnl.c:1706: Test failed: got size 1967527537 ntoskrnl.c:1716: Test failed: got size 1967527537 ntoskrnl.c:1735: Test failed: got size 1967527537 ntoskrnl.c:1855: Test failed: failed to get device list, error 0xd
=== w7u_el (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1505: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1513: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1515: Test failed: got flags 0 ntoskrnl.c:1519: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1520: Test failed: wrong path "p\xd2a" ntoskrnl.c:1526: Test failed: got error 2 ntoskrnl.c:1547: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1570: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1572: Test failed: got flags 0 ntoskrnl.c:1586: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1640: Test failed: got type 488 ntoskrnl.c:1655: Test failed: got type 488 ntoskrnl.c:1656: Test failed: got size 1963857521 ntoskrnl.c:1657: Test failed: got hardware IDs "\x05\x00\x00\x00p\xd2a\x00s\x00e\x00r\x00s\x00\\x00w\x00\x04\x00\x00\x00e\x00t\x00e\x00s\x00\x04\x00\x00\x00|\xf3"\x00\x00\x00\x00\x00R\x00O\x00O\x00T\x00\\x00W\x00I\x00N\x00E\x00T\x00E\x00S\x00T\x00\\x000\x00\x00\x00i\x00n\x00e\x00t\x00e\x00s\x00t\x00.\x00i\x00n\x00f\x00\x00\x00\x00\x00"... ntoskrnl.c:1663: Test failed: got type 488 ntoskrnl.c:1664: Test failed: got size 1963857521 ntoskrnl.c:1665: Test failed: got container ID L"\5c22\3078\5c35\3078\5c30\3078\5c30\3078\7030\785c\3264\5c61\3078\7330\785c\3030\5c65\3078\7230\785c\3030\5c73\3078\5c30\5c5c\3078\7730\785c\3030\785c\3430\785c\3030\785c\3030\785c\3030\5c65\3078\7430\785c\3030\5c65\3078\7330\785c\3030\785c\3430\785c\3030\785c\3030\785c\3030\5c7c\6678\5c33"... ntoskrnl.c:1670: Test failed: got type 488 ntoskrnl.c:1671: Test failed: got size 1963857521 ntoskrnl.c:1672: Test failed: got compatible IDs "\x05\x00\x00\x00p\xd2a\x00s\x00e\x00r\x00s\x00\\x00w\x00\x04\x00\x00\x00e\x00t\x00e\x00s\x00\x04\x00\x00\x00|\xf3"\x00\x00\x00\x00\x00R\x00O\x00O\x00T\x00\\x00W\x00I\x00N\x00E\x00T\x00E\x00S\x00T\x00\\x000\x00\x00\x00i\x00n\x00e\x00t\x00e\x00s\x00t\x00.\x00i\x00n\x00f\x00\x00\x00\x00\x00"... ntoskrnl.c:1685: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1687: Test failed: got flags 0 ntoskrnl.c:1691: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1692: Test failed: wrong path "p\xd2a" ntoskrnl.c:1706: Test failed: got size 1963857521 ntoskrnl.c:1716: Test failed: got size 1963857521 ntoskrnl.c:1735: Test failed: got size 1963857521 ntoskrnl.c:1855: Test failed: failed to get device list, error 0xd
=== w1064_tsign (64 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1219: Test failed: Got unexpected ret -1. ntoskrnl.c:1220: Test failed: Received unexpected data.
On 2/13/23 23:14, Marvin wrote:
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129371
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1505: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1513: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1515: Test failed: got flags 0 ntoskrnl.c:1519: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1520: Test failed: wrong path "x\x19)" ntoskrnl.c:1526: Test failed: got error 123
I'm not sure what went wrong here. Possibly a race condition—the driver wasn't actually loaded in time? Either way it shouldn't be related to this patch series.
=== w1064_tsign (64 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1219: Test failed: Got unexpected ret -1. ntoskrnl.c:1220: Test failed: Received unexpected data.
Not quite clear what went wrong here, but it shouldn't be related either.
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
}
-static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +static DWORD CALLBACK devnotify_windowW_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header)
```suggestion:-0+0 static DWORD CALLBACK devnotify_window_callbackW( HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header ) ```
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
}
-static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +static DWORD CALLBACK devnotify_windowW_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) { SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); return 0; }
+static DWORD CALLBACK devnotify_windowA_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header)
```suggestion:-0+0 static DWORD CALLBACK devnotify_window_callbackA( HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header ) ```
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
}
-static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +static DWORD CALLBACK devnotify_windowW_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) { SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); return 0; }
+static DWORD CALLBACK devnotify_windowA_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +{
- if (flags & 0x8000)
I think it'd be better with an early return here to save the indentation.
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
-static DWORD CALLBACK devnotify_window_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +static DWORD CALLBACK devnotify_windowW_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) { SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL); return 0; }
+static DWORD CALLBACK devnotify_windowA_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +{
- if (flags & 0x8000)
- {
switch (header->dbch_devicetype)
{
case DBT_DEVTYP_DEVICEINTERFACE:
{
```suggestion:-3+0 switch (header->dbch_devicetype) { case DBT_DEVTYP_DEVICEINTERFACE: { ```
I believe user32 generally doesn't use indented cases.
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
+static DWORD CALLBACK devnotify_windowA_callback(HANDLE handle, DWORD flags, DEV_BROADCAST_HDR *header) +{
- if (flags & 0x8000)
- {
switch (header->dbch_devicetype)
{
case DBT_DEVTYP_DEVICEINTERFACE:
{
const DEV_BROADCAST_DEVICEINTERFACE_W *ifaceW = (const DEV_BROADCAST_DEVICEINTERFACE_W *)header;
size_t lenW = wcslen( ifaceW->dbcc_name );
DEV_BROADCAST_DEVICEINTERFACE_A *ifaceA;
DWORD lenA;
if (!(ifaceA = malloc( offsetof(DEV_BROADCAST_DEVICEINTERFACE_A, dbcc_name[lenW * 3 + 1]) )))
return FALSE;
```suggestion:-0+0 return 0; ```
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
ifaceA->dbcc_size = offsetof(DEV_BROADCAST_DEVICEINTERFACE_A, dbcc_name[lenA + 1]);
ifaceA->dbcc_devicetype = ifaceW->dbcc_devicetype;
ifaceA->dbcc_reserved = ifaceW->dbcc_reserved;
ifaceA->dbcc_classguid = ifaceW->dbcc_classguid;
SendMessageTimeoutA(handle, WM_DEVICECHANGE, flags, (LPARAM)ifaceA, SMTO_ABORTIFHUNG, 2000, NULL);
free( ifaceA );
break;
}
default:
FIXME( "unimplemented W to A mapping for %#lx\n", header->dbch_devicetype );
/* fall through */
case DBT_DEVTYP_HANDLE:
case DBT_DEVTYP_OEM:
SendMessageTimeoutA(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
}
```suggestion:-0+0 break; } ```
Rémi Bernon (@rbernon) commented about dlls/user32/input.c:
if (flags & DEVICE_NOTIFY_SERVICE_HANDLE) details.cb = devnotify_service_callback;
- else if (IsWindowUnicode( handle ))
elsedetails.cb = devnotify_windowW_callback;
details.cb = devnotify_window_callback;
details.cb = devnotify_windowA_callback;
```suggestion:-2+0 details.cb = devnotify_window_callbackW; else details.cb = devnotify_window_callbackA; ```
```
=== w7u_2qxl (32 bit report) ===
ntoskrnl.exe: ntoskrnl.c:1505: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1513: Test failed: wrong class {00000000-0000-0000-0000-000000000000} ntoskrnl.c:1515: Test failed: got flags 0 ntoskrnl.c:1519: Test failed: failed to get interface path, error 0x57 ntoskrnl.c:1520: Test failed: wrong path "x\x19)" ntoskrnl.c:1526: Test failed: got error 123
I'm not sure what went wrong here. Possibly a race condition—the driver wasn't actually loaded in time? Either way it shouldn't be related to this patch series. ```
They are, caused by https://gitlab.winehq.org/wine/wine/-/merge_requests/2185/diffs?commit_id=c7... somehow.