Remove support for performance tests since that never worked Modified: trunk/reactos/regtests/regtests/regtests.c Modified: trunk/reactos/regtests/regtests/regtests.def Modified: trunk/reactos/regtests/shared/regtests.c Modified: trunk/reactos/regtests/shared/regtests.h Deleted: trunk/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance. c Modified: trunk/reactos/subsys/win32k/tests/win32k.xml _____
Modified: trunk/reactos/regtests/regtests/regtests.c --- trunk/reactos/regtests/regtests/regtests.c 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/regtests/regtests/regtests.c 2005-11-20 13:34:15 UTC (rev 19361) @@ -99,24 +99,6 @@
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) { _____
Modified: trunk/reactos/regtests/regtests/regtests.def --- trunk/reactos/regtests/regtests/regtests.def 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/regtests/regtests/regtests.def 2005-11-20 13:34:15 UTC (rev 19361) @@ -14,7 +14,4 @@
_SetThreadPriority@8 _GetCurrentProcess@0 _GetCurrentThread@0 -_GetThreadContext@8 -_SuspendThread@4 -_ResumeThread@4 _Sleep@4 _____
Modified: trunk/reactos/regtests/shared/regtests.c --- trunk/reactos/regtests/shared/regtests.c 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/regtests/shared/regtests.c 2005-11-20 13:34:15 UTC (rev 19361) @@ -68,12 +68,6 @@
return 1; }
-BOOL -IsContextChanged(LPCONTEXT context1, LPCONTEXT context2) -{ - return memcmp(context1, context2, sizeof(CONTEXT)) != 0; -} - VOID ControlNormalTest(HANDLE hThread, PERFORM_TEST_ARGS *Args, @@ -98,50 +92,6 @@ }
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(¤tContext, sizeof(CONTEXT)); - currentContext.ContextFlags = CONTEXT_FULL; - - do { - _Sleep(1); - - if (_SuspendThread(hThread) == (DWORD)-1) - break; - - if (_GetThreadContext(hThread, ¤tContext) == 0) - break; - - if (IsContextChanged(¤tContext, &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 @@ 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; _____
Modified: trunk/reactos/regtests/shared/regtests.h --- trunk/reactos/regtests/shared/regtests.h 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/regtests/shared/regtests.h 2005-11-20 13:34:15 UTC (rev 19361) @@ -30,7 +30,6 @@
/* 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 @@ 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);
_____
Deleted: trunk/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance. c --- trunk/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance. c 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/subsys/win32k/tests/tests/DIB_24BPP_ColorFill-performance. c 2005-11-20 13:34:15 UTC (rev 19361) @@ -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) _____
Modified: trunk/reactos/subsys/win32k/tests/win32k.xml --- trunk/reactos/subsys/win32k/tests/win32k.xml 2005-11-20 13:17:05 UTC (rev 19360) +++ trunk/reactos/subsys/win32k/tests/win32k.xml 2005-11-20 13:34:15 UTC (rev 19361) @@ -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>