Remove support for performance tests since that never worked

svn path=/trunk/; revision=19361
This commit is contained in:
Casper Hornstrup
2005-11-20 13:34:15 +00:00
parent f1bef0d01a
commit 031ac865db
6 changed files with 0 additions and 131 deletions

View File

@@ -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)
{

View File

@@ -14,7 +14,4 @@ _SetPriorityClass@8
_SetThreadPriority@8
_GetCurrentProcess@0
_GetCurrentThread@0
_GetThreadContext@8
_SuspendThread@4
_ResumeThread@4
_Sleep@4

View File

@@ -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;

View File

@@ -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);

View File

@@ -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)

View 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>