[PATCH] ntprint: Do not fail when the spooler service was stopped
Detlef Riekenberg
wine.dev at web.de
Thu Jun 7 17:28:09 CDT 2012
--
By by ... Detlef
---
dlls/ntprint/tests/ntprint.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/dlls/ntprint/tests/ntprint.c b/dlls/ntprint/tests/ntprint.c
index cf9853d..0fc9ad3e 100644
--- a/dlls/ntprint/tests/ntprint.c
+++ b/dlls/ntprint/tests/ntprint.c
@@ -70,6 +70,10 @@ static void test_PSetupCreateMonitorInfo(VOID)
SetLastError(0xdeadbeef);
mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL);
+ if (!mi && (GetLastError() == RPC_S_SERVER_UNAVAILABLE)) {
+ win_skip("The Service 'Spooler' is required for many test\n");
+ return;
+ }
ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError());
if (mi) pPSetupDestroyMonitorInfo(mi);
@@ -88,22 +92,25 @@ static void test_PSetupDestroyMonitorInfo(VOID)
{
HANDLE mi;
-
SetLastError(0xdeadbeef);
pPSetupDestroyMonitorInfo(NULL);
- /* lasterror is returned */
- trace("returned with %u\n", GetLastError());
+ /* lasterror is untouched */
+ ok(GetLastError() == 0xdeadbeef, "returned with 0x%x\n", GetLastError());
SetLastError(0xdeadbeef);
mi = pPSetupCreateMonitorInfo(NULL, NULL, NULL);
+ if (!mi && (GetLastError() == RPC_S_SERVER_UNAVAILABLE)) {
+ win_skip("The Service 'Spooler' is required for many test\n");
+ return;
+ }
ok( mi != NULL, "got %p with %u (expected '!= NULL')\n", mi, GetLastError());
if (!mi) return;
SetLastError(0xdeadbeef);
pPSetupDestroyMonitorInfo(mi);
- /* lasterror is returned */
- trace("returned with %u\n", GetLastError());
+ /* lasterror is untouched */
+ ok(GetLastError() == 0xdeadbeef, "returned with 0x%x\n", GetLastError());
/* Try to destroy the handle twice crash with native ntprint.dll */
if (0) {
--
1.7.5.4
More information about the wine-patches
mailing list