Zebediah Figura : ntoskrnl/tests: Test retrieving SPDRP_CONFIGFLAGS.
Module: wine Branch: master Commit: 3a254079b9b609dd0b626a106240acb2aba5f814 URL: https://gitlab.winehq.org/wine/wine/-/commit/3a254079b9b609dd0b626a106240acb... Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Nov 16 19:42:22 2022 -0600 ntoskrnl/tests: Test retrieving SPDRP_CONFIGFLAGS. --- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index 6d8513ffa35..948253608ae 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1631,6 +1631,15 @@ static void test_pnp_devices(void) if (ret) ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError()); + ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); + if (ret) + { + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type); + } + ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVTYPE, &type, (BYTE *)&dword, sizeof(dword), NULL); ok(!ret, "expected failure\n"); @@ -1740,6 +1749,7 @@ static void test_pnp_driver(struct testsign_context *ctx) SC_HANDLE manager, service; BOOL ret, need_reboot; HANDLE catalog, file; + DWORD dword, type; unsigned int i; HDEVINFO set; FILE *f; @@ -1798,11 +1808,25 @@ static void test_pnp_driver(struct testsign_context *ctx) ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); ok(ret, "failed to register device, error %#lx\n", GetLastError()); + ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_INVALID_DATA, "got error %#lx\n", GetLastError()); + GetFullPathNameA("winetest.inf", sizeof(path), path, NULL); ret = UpdateDriverForPlugAndPlayDevicesA(NULL, hardware_id, path, INSTALLFLAG_FORCE, &need_reboot); ok(ret, "failed to install device, error %#lx\n", GetLastError()); ok(!need_reboot, "expected no reboot necessary\n"); + ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CONFIGFLAGS, + &type, (BYTE *)&dword, sizeof(dword), NULL); + todo_wine ok(ret, "got error %#lx\n", GetLastError()); + if (ret) + { + ok(!dword, "got flags %#lx\n", dword); + ok(type == REG_DWORD, "got type %lu\n", type); + } + /* Tests. */ test_pnp_devices();
participants (1)
-
Alexandre Julliard