Author: cfinck
Date: Fri Jan 13 16:15:13 2017
New Revision: 73539

URL: http://svn.reactos.org/svn/reactos?rev=73539&view=rev
Log:
[LOCALSPL_APITEST]
Disable fpGetPrintProcessorDirectory tests that use PSEH.
For some reason, they can only be run once and corrupt something inside 
spoolsv, so that spoolsv needs to be restarted afterwards.

Modified:
    trunk/rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c

Modified: trunk/rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c?rev=73539&r1=73538&r2=73539&view=diff
==============================================================================
--- trunk/rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c 
[iso-8859-1] (original)
+++ trunk/rostests/apitests/localspl/dll/fpGetPrintProcessorDirectory.c 
[iso-8859-1] Fri Jan 13 16:15:13 2017
@@ -2,7 +2,7 @@
  * PROJECT:     ReactOS Local Spooler API Tests Injected DLL
  * LICENSE:     GNU GPLv2 or any later version as published by the Free 
Software Foundation
  * PURPOSE:     Tests for fpGetPrintProcessorDirectory
- * COPYRIGHT:   Copyright 2016 Colin Finck <co...@reactos.org>
+ * COPYRIGHT:   Copyright 2016-2017 Colin Finck <co...@reactos.org>
  */
 
 #include <apitest.h>
@@ -26,7 +26,7 @@
 {
     DWORD cbNeeded;
     DWORD cbTemp;
-    DWORD dwReturned;
+    //DWORD dwReturned;
     PGetPrintProcessorDirectoryW pGetPrintProcessorDirectoryW;
     PRINTPROVIDOR pp;
     PWSTR pwszBuffer;
@@ -48,6 +48,8 @@
     ok(!pp.fpGetPrintProcessorDirectory(NULL, L"invalid", 0, NULL, 0, NULL), 
"fpGetPrintProcessorDirectory returns TRUE!\n");
     ok(GetLastError() == ERROR_INVALID_ENVIRONMENT, 
"fpGetPrintProcessorDirectory returns error %lu!\n", GetLastError());
 
+       // This test corrupts something inside spoolsv so that it's only 
runnable once without restarting spoolsv. Therefore it's disabled.
+#if 0
     // Now provide a valid environment and prove that it is checked 
case-insensitively.
     // In contrast to GetPrintProcessorDirectoryW, the level isn't the next 
thing checked here, but fpGetPrintProcessorDirectory
     // already tries to access the non-supplied pcbNeeded variable.
@@ -63,6 +65,7 @@
     _SEH2_END;
 
     ok(dwReturned == EXCEPTION_ACCESS_VIOLATION, "dwReturned is %lu!\n", 
dwReturned);
+#endif
 
     // fpGetPrintProcessorDirectory doesn't care about the supplied level at 
all. Prove this here.
     // With no buffer given, this needs to fail with ERROR_INSUFFICIENT_BUFFER.
@@ -72,6 +75,8 @@
     ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, 
"fpGetPrintProcessorDirectory returns error %lu!\n", GetLastError());
     ok(cbNeeded > 0, "cbNeeded is %lu!\n", cbNeeded);
 
+       // This test corrupts something inside spoolsv so that it's only 
runnable once without restarting spoolsv. Therefore it's disabled.
+#if 0
     // Now provide the demanded size, but no buffer.
     // Unlike GetPrintProcessorDirectoryW, fpGetPrintProcessorDirectory 
doesn't check for this case and tries to access the buffer.
     _SEH2_TRY
@@ -86,6 +91,7 @@
     _SEH2_END;
 
     ok(dwReturned == EXCEPTION_ACCESS_VIOLATION, "dwReturned is %lu!\n", 
dwReturned);
+#endif
 
     // Prove that this check is implemented in spoolss' 
GetPrintProcessorDirectoryW instead.
     // In contrast to winspool's GetPrintProcessorDirectoryW, cbTemp is left 
untouched though. This comes from the fact that RPC isn't involved here.


Reply via email to