Zebediah Figura : setupapi/tests: Test calling SetupDiEnumDeviceInterfaces () with a NULL device.
Alexandre Julliard
julliard at winehq.org
Tue May 28 15:06:49 CDT 2019
Module: wine
Branch: master
Commit: bf09cca85090094121a390b2f83b1a10b5862aa2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bf09cca85090094121a390b2f83b1a10b5862aa2
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Mon May 27 22:13:14 2019 -0500
setupapi/tests: Test calling SetupDiEnumDeviceInterfaces() with a NULL device.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/setupapi/tests/devinst.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 8477020..53e50b8 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -1055,8 +1055,8 @@ static void test_device_iface(void)
{
char buffer[200];
SP_DEVICE_INTERFACE_DETAIL_DATA_A *detail = (SP_DEVICE_INTERFACE_DETAIL_DATA_A *)buffer;
+ SP_DEVINFO_DATA device = {0}, device2 = {sizeof(device2)};
SP_DEVICE_INTERFACE_DATA iface = {sizeof(iface)};
- SP_DEVINFO_DATA device = {0};
BOOL ret;
HDEVINFO set;
@@ -1154,6 +1154,16 @@ static void test_device_iface(void)
check_device_iface(set, &device, &guid, 1, 0, "\\\\?\\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\\test");
check_device_iface(set, &device, &guid, 2, 0, NULL);
+ ret = SetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0001", &guid, NULL, NULL, 0, &device2);
+ ok(ret, "Failed to create device, error %#x.\n", GetLastError());
+ ret = SetupDiCreateDeviceInterfaceA(set, &device2, &guid, NULL, 0, NULL);
+ ok(ret, "Failed to create interface, error %#x.\n", GetLastError());
+
+ check_device_iface(set, NULL, &guid, 0, 0, "\\\\?\\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\\Oogah");
+ check_device_iface(set, NULL, &guid, 1, 0, "\\\\?\\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\\test");
+ check_device_iface(set, NULL, &guid, 2, 0, "\\\\?\\ROOT#LEGACY_BOGUS#0001#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}");
+ check_device_iface(set, NULL, &guid, 3, 0, NULL);
+
ret = SetupDiDestroyDeviceInfoList(set);
ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError());
}
More information about the wine-cvs
mailing list