From: Robert Gerigk <Robert-Gerigk@online.de> The test setup registers exactly one child, so the siblings list is empty. Verify that DEVPKEY_Device_Siblings is set on the child PDO and holds a properly-terminated empty MULTI_SZ (a single trailing NUL). Signed-off-by: Jan Robert Gerigk <Robert-Gerigk@online.de> --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 3f0d4885c31..524b038df88 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -2281,6 +2281,20 @@ static void test_pnp_devices(void) SetupDiDestroyDeviceInfoList(bus_set); } + /* DEVPKEY_Device_Siblings — set on each child after bus enumeration. + * The test setup registers exactly one child, so the siblings list + * is empty. handle_bus_relations() writes the empty list as a single + * trailing NUL (one WCHAR). */ + prop_type = DEVPROP_TYPE_EMPTY; + size = 0; + memset(buffer_w, 0, sizeof(buffer_w)); + ret = SetupDiGetDevicePropertyW(set, &device, &DEVPKEY_Device_Siblings, &prop_type, + (BYTE *)buffer_w, sizeof(buffer_w), &size, 0); + ok(ret, "DEVPKEY_Device_Siblings missing, error %#lx\n", GetLastError()); + ok(prop_type == DEVPROP_TYPE_STRING_LIST, "got type %#lx\n", prop_type); + ok(size == sizeof(WCHAR), "got size %lu, expected %Iu\n", size, sizeof(WCHAR)); + ok(buffer_w[0] == 0, "got non-empty siblings %s\n", debugstr_w(buffer_w)); + ret = SetupDiEnumDeviceInterfaces(set, NULL, &child_class, 0, &iface); ok(ret, "failed to get interface, error %#lx\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &child_class), -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10604