Paul Vriens : setupapi/tests: Skip tests on win9x.
Alexandre Julliard
julliard at winehq.org
Mon May 26 13:13:08 CDT 2008
Module: wine
Branch: master
Commit: 2b27d9baed8cd767ca12c71b7b044fd47b066527
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b27d9baed8cd767ca12c71b7b044fd47b066527
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Mon May 26 12:13:07 2008 +0200
setupapi/tests: Skip tests on win9x.
---
dlls/setupapi/tests/devinst.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 4b8dd5a..986d1ae 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -727,6 +727,7 @@ static void testDevRegKey(void)
'0','0','1','1','9','5','5','c','2','b','d','b','}',0};
BOOL ret;
HDEVINFO set;
+ HKEY key = NULL;
if (!pSetupDiCreateDeviceInfoList || !pSetupDiDestroyDeviceInfoList ||
!pSetupDiCreateDeviceInfoA || !pSetupDiOpenDevRegKey ||
@@ -736,12 +737,25 @@ static void testDevRegKey(void)
skip("No SetupDiOpenDevRegKey\n");
return;
}
+
+ /* Check if we are on win9x */
+ SetLastError(0xdeadbeef);
+ key = pSetupDiCreateDevRegKeyW(NULL, NULL, 0, 0, 0, NULL, NULL);
+ if (key == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ {
+ skip("We are on win9x where the tests introduce issues\n");
+ return;
+ }
+ ok(key == INVALID_HANDLE_VALUE,
+ "Expected INVALID_HANDLE_VALUE, got %p\n", key);
+ ok(GetLastError() == ERROR_INVALID_HANDLE,
+ "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError());
+
set = pSetupDiCreateDeviceInfoList(&guid, NULL);
ok(set != NULL, "SetupDiCreateDeviceInfoList failed: %d\n", GetLastError());
if (set)
{
SP_DEVINFO_DATA devInfo = { sizeof(devInfo), { 0 } };
- HKEY key = INVALID_HANDLE_VALUE;
ret = pSetupDiCreateDeviceInfoA(set, "ROOT\\LEGACY_BOGUS\\0000", &guid,
NULL, NULL, 0, &devInfo);
More information about the wine-cvs
mailing list