On Fri Apr 17 19:58:07 2026 +0000, Elizabeth Figura wrote:
One thing (I did mention this, but no worries): can we add tests for 1/7, 3/7, and 4/7? 2/7: ``` + { + WCHAR parent_id[MAX_DEVICE_ID_LEN]; + if (!get_device_instance_id( parent_device, parent_id )) + SetupDiSetDevicePropertyW( set, &sp_device, &DEVPKEY_Device_Parent, DEVPROP_TYPE_STRING, + (BYTE *)parent_id, (wcslen( parent_id ) + 1) * sizeof(WCHAR), 0 ); + } ``` We don't need a scope for this, just put parent_id[] at the beginning. Same for 3/7. 7/7: ``` + ok(buffer_w[0] != 0, "got empty parent ID\n"); + trace("DEVPKEY_Device_Parent: %s\n", debugstr_w(buffer_w)); ``` Can't we test the actual contents? I have addressed all three points:
2/7 and 3/7: removed the scope blocks, moved parent_id\[\] (and friends in 3/7: parent_sp, child_ids, count) to the functions declaration block. 7/7: replaced the non-empty check with ok(!wcscmp(buffer_w, L"ROOT\\WINETEST\\0"), ...) plus a matching size check. As a side effect, 4/7s scope block and duplicate child_ids/count are gone. The Siblings loop now reuses the function-level vars from 3/7, with a single free() at the end. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10604#note_136829