Paul Vriens : setupapi/tests: Skip some tests if we are on win9x.
Alexandre Julliard
julliard at winehq.org
Wed May 21 16:31:56 CDT 2008
Module: wine
Branch: master
Commit: bece26be546b518c7432e956ea1af1db78625c4a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bece26be546b518c7432e956ea1af1db78625c4a
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Wed May 21 17:00:11 2008 +0200
setupapi/tests: Skip some tests if we are on win9x.
---
dlls/setupapi/tests/devinst.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 822cd28..0a9a9a8 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -349,8 +349,22 @@ static void testCreateDeviceInfo(void)
}
SetLastError(0xdeadbeef);
ret = pSetupDiCreateDeviceInfoA(NULL, NULL, NULL, NULL, NULL, 0, NULL);
- ok(!ret && GetLastError() == ERROR_INVALID_DEVINST_NAME,
- "Expected ERROR_INVALID_DEVINST_NAME, got %08x\n", GetLastError());
+ ok(!ret, "Expected failure\n");
+ ok(GetLastError() == ERROR_INVALID_DEVINST_NAME ||
+ GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */ ||
+ GetLastError() == ERROR_INVALID_HANDLE /* Win9x */,
+ "Unexpected last error, got %08x\n", GetLastError());
+
+ /* If we are running on win9x we should skip these tests. Win95
+ * fails most tests anyway and win98 pops up the "Add New Hardware
+ * Wizard".
+ */
+ if (GetLastError() == ERROR_INVALID_HANDLE)
+ {
+ skip("We are on win9x where the tests introduce issues\n");
+ return;
+ }
+
SetLastError(0xdeadbeef);
ret = pSetupDiCreateDeviceInfoA(NULL, "Root\\LEGACY_BOGUS\\0000", NULL,
NULL, NULL, 0, NULL);
More information about the wine-cvs
mailing list