The branch is rebased on current master with all three points addressed. The structure is now 8 commits, each source change followed by its test: ntoskrnl: Store DEVPKEY_Device_Parent when enumerating child devices. ntoskrnl/tests: Add DEVPKEY_Device_Parent test. ntoskrnl: Store DEVPKEY_Device_Children on parent after bus enumeration. ntoskrnl/tests: Add DEVPKEY_Device_Children test. ntoskrnl: Store DEVPKEY_Device_Siblings on each child after bus enumeration. ntoskrnl/tests: Add DEVPKEY_Device_Siblings test. cfgmgr32: Implement CM_Get_Parent using DEVPKEY_Device_Parent property. ntoskrnl/tests: Test CM_Get_Parent on the PnP-managed child device. 1/9 (and its test 2/9): dropped. I added an ERR() trace at the delete_device(device) call in SETUPDI_EnumerateMatchingInterfaces and ran (a) the full setupapi/devinst suite and (b) a SetupDiGetClassDevs(NULL, NULL, NULL, DIGCF_ALLCLASSES | DIGCF_DEVICEINTERFACE | DIGCF_PRESENT) enumeration on a fresh prefix with a HID device plugged in. The delete path never fires. I cannot reconstruct the failure case the original commit was meant to address. If a concrete reproducer ever surfaces it will come back as its own MR with a test that actually exercises the path. 6/9 (Children test): wcsicmp replaced by exact wcscmp/memcmp against the verbatim MULTI_SZ L"Wine\\Test\\1\\0". The trailing double-NUL terminator is included in the comparison via sizeof(expected_children). Mixed case is what the test driver actually reports, confirmed locally. DEVPKEY_Device_Siblings test: added as commit 6. The test setup has exactly one child, so the property is verified to hold an empty MULTI_SZ (a single trailing NUL, one WCHAR). 9/9 (CM_Get_Parent): moved to ntoskrnl/tests/ntoskrnl.c::test_pnp_devices. With the child managed by the bus driver, DEVPKEY_Device_Parent is reliably populated and the assertion is now strict: CR_SUCCESS, non-null DEVINST, and the parent's instance ID equals "ROOT\\WINETEST\\0". In setupapi/tests/devinst.c only the CR_INVALID_POINTER parameter-validation check remains. All 8 commits build individually as verified by git rebase --exec. setupapi/tests/devinst.exe reports 4363 tests / 0 failures locally. ntoskrnl.exe_test.exe compile-checked in both archs, the actual test_pnp_devices run requires a signed kernel driver and was left to the WineHQ CI. End-to-end verification against the original use case: ETS6 launched against a Wine prefix built from this branch, with the KNX USB license dongle (2a07:0102) plugged in. The dongle is detected by the application, confirming the CM_Get_Parent path resolves correctly through DEVPKEY_Device_Parent at runtime. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10604#note_141254