Remove support for performance tests since that never worked
authorCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 20 Nov 2005 13:34:15 +0000 (13:34 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Sun, 20 Nov 2005 13:34:15 +0000 (13:34 +0000)
svn path=/trunk/; revision=19361

reactos/regtests/regtests/regtests.c
reactos/regtests/regtests/regtests.def
reactos/regtests/shared/regtests.c
reactos/regtests/shared/regtests.h
reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance.c [deleted file]
reactos/subsys/win32k/tests/win32k.xml

index e321aae..ccda2f9 100755 (executable)
@@ -99,24 +99,6 @@ _GetCurrentThread()
   return GetCurrentThread();
 }
 
-BOOL STDCALL
-_GetThreadContext(HANDLE hThread, LPCONTEXT lpContext)
-{
-  return GetThreadContext(hThread, lpContext);
-}
-
-DWORD STDCALL
-_SuspendThread(HANDLE hThread)
-{
-  return SuspendThread(hThread);
-}
-
-DWORD STDCALL
-_ResumeThread(HANDLE hThread)
-{
-  return ResumeThread(hThread);
-}
-
 VOID STDCALL
 _Sleep(DWORD dwMilliseconds)
 {
index 3cd1eec..cd492c3 100644 (file)
@@ -14,7 +14,4 @@ _SetPriorityClass@8
 _SetThreadPriority@8
 _GetCurrentProcess@0
 _GetCurrentThread@0
-_GetThreadContext@8
-_SuspendThread@4
-_ResumeThread@4
 _Sleep@4
index 64daacc..3513911 100755 (executable)
@@ -68,12 +68,6 @@ PerformTest(PVOID _arg)
   return 1;
 }
 
-BOOL
-IsContextChanged(LPCONTEXT context1, LPCONTEXT context2)
-{
-  return memcmp(context1, context2, sizeof(CONTEXT)) != 0;
-}
-
 VOID
 ControlNormalTest(HANDLE hThread,
             PERFORM_TEST_ARGS *Args,
@@ -97,50 +91,6 @@ ControlNormalTest(HANDLE hThread,
   Args->Time = executionTime.dwLowDateTime / 10000;
 }
 
-VOID
-ControlPerformanceTest(HANDLE hThread,
-            PERFORM_TEST_ARGS *Args,
-            DWORD TimeOut)
-{
-  DWORD status;
-  CONTEXT lastContext;
-  CONTEXT currentContext;
-
-  ZeroMemory(&lastContext, sizeof(CONTEXT));
-  lastContext.ContextFlags = CONTEXT_FULL;
-  ZeroMemory(&currentContext, sizeof(CONTEXT));
-  currentContext.ContextFlags = CONTEXT_FULL;
-
-  do {
-    _Sleep(1);
-
-    if (_SuspendThread(hThread) == (DWORD)-1)
-      break;
-
-    if (_GetThreadContext(hThread, &currentContext) == 0)
-      break;
-
-   if (IsContextChanged(&currentContext, &lastContext))
-     Args->Time++;
-
-    if (_ResumeThread(hThread) == (DWORD)-1)
-      break;
-
-    if (Args->Time >= TimeOut)
-      {
-        _TerminateThread(hThread, 0);
-        Args->Result = TS_TIMEDOUT;
-        break;
-      }
-
-    status = _WaitForSingleObject(hThread, 0);
-    if (status == WAIT_OBJECT_0 || status == WAIT_FAILED)
-      break;
-
-    lastContext = currentContext;
-  } while (TRUE);
-}
-
 VOID
 DisplayResult(PERFORM_TEST_ARGS* Args,
               LPSTR OutputBuffer)
@@ -183,9 +133,6 @@ ControlTest(HANDLE hThread,
     case TT_NORMAL:
       ControlNormalTest(hThread, Args, TimeOut);
       break;
-    case TT_PERFORMANCE:
-      ControlPerformanceTest(hThread, Args, TimeOut);
-      break;
     default:
       printf("Unknown test type %ld\n", TestType);
       break;
index 1510cf1..9d6e772 100755 (executable)
@@ -30,7 +30,6 @@ void SetupOnce()
 
 /* Test types */
 #define TT_NORMAL         0
-#define TT_PERFORMANCE    1
 
 /* Valid values for return values of TestRoutine */
 #define TS_TIMEDOUT      ((DWORD)-2)
@@ -237,15 +236,6 @@ _GetCurrentProcess();
 HANDLE STDCALL
 _GetCurrentThread();
 
-BOOL STDCALL
-_GetThreadContext(HANDLE hThread, LPCONTEXT lpContext);
-
-DWORD STDCALL
-_SuspendThread(HANDLE hThread);
-
-DWORD STDCALL
-_ResumeThread(HANDLE hThread);
-
 VOID STDCALL
 _Sleep(DWORD dwMilliseconds);
 
diff --git a/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance.c b/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance.c
deleted file mode 100644 (file)
index 5e63b0f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <w32k.h>
-
-#include "regtests.h"
-
-static void SetupSurface(SURFOBJ* surface, RECTL* rect)
-{
-  UINT sizex;
-  UINT sizey;
-  UINT size;
-  UINT depth;
-
-  RtlZeroMemory(surface, sizeof(SURFOBJ));
-  depth = BitsPerFormat(BMF_24BPP);
-  sizex = rect->right - rect->left;
-  sizey = rect->bottom - rect->top;
-  size = sizey * sizex * depth;
-  surface->pvScan0 = malloc(size);
-  surface->lDelta = DIB_GetDIBWidthBytes(sizex, depth);
-}
-
-static void CleanupSurface(SURFOBJ* surface)
-{
-  free(surface->pvScan0);
-}
-
-static void RunTest()
-{
-  static RECTL rect = { 0, 0, 100, 100 };
-  SURFOBJ surface;
-  UINT color;
-  UINT i;
-
-  SetupSurface(&surface, &rect);
-  for (i = 0; i < 10000; i++)
-  {
-    BOOLEAN success = DIB_24BPP_ColorFill(&surface, &rect, color);
-    _AssertTrue(success);
-    if (!success)
-      break;
-  }
-  CleanupSurface(&surface);
-}
-
-_DispatcherType(Dib_24bpp_colorfill_performanceTest, "DIB_24BPP_ColorFill performance", TT_PERFORMANCE)
index 0903b04..9279905 100644 (file)
@@ -14,9 +14,6 @@
        <library>regtests</library>
        <library>win32k_base</library>
        <library>pseh</library>
-       <directory name="tests">
-               <file>DIB_24BPP_ColorFill-performance.c</file>
-       </directory>
        <file>setup.c</file>
        <xi:include href="stubs.xml" />
 </module>