mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 01:29:43 +00:00
[KMTESTS:CC] Extended previous test to show an overlap is enough
This commit is contained in:
parent
ad0c93b001
commit
262e5bfef1
1 changed files with 8 additions and 1 deletions
|
@ -24,6 +24,7 @@ typedef struct _TEST_CONTEXT
|
||||||
{
|
{
|
||||||
PVOID Bcb;
|
PVOID Bcb;
|
||||||
PVOID Buffer;
|
PVOID Buffer;
|
||||||
|
ULONG Length;
|
||||||
} TEST_CONTEXT, *PTEST_CONTEXT;
|
} TEST_CONTEXT, *PTEST_CONTEXT;
|
||||||
|
|
||||||
static BOOLEAN TestMap = FALSE;
|
static BOOLEAN TestMap = FALSE;
|
||||||
|
@ -162,12 +163,13 @@ MapInAnotherThread(IN PVOID Context)
|
||||||
ok(TestContext != NULL, "Called in invalid context!\n");
|
ok(TestContext != NULL, "Called in invalid context!\n");
|
||||||
ok(TestContext->Bcb != NULL, "Called in invalid context!\n");
|
ok(TestContext->Bcb != NULL, "Called in invalid context!\n");
|
||||||
ok(TestContext->Buffer != NULL, "Called in invalid context!\n");
|
ok(TestContext->Buffer != NULL, "Called in invalid context!\n");
|
||||||
|
ok(TestContext->Length != 0, "Called in invalid context!\n");
|
||||||
|
|
||||||
Ret = FALSE;
|
Ret = FALSE;
|
||||||
Offset.QuadPart = 0x1000;
|
Offset.QuadPart = 0x1000;
|
||||||
KmtStartSeh();
|
KmtStartSeh();
|
||||||
TestMap = TRUE;
|
TestMap = TRUE;
|
||||||
Ret = CcMapData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
|
Ret = CcMapData(TestFileObject, &Offset, TestContext->Length, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
|
||||||
TestMap = FALSE;
|
TestMap = FALSE;
|
||||||
KmtEndSeh(STATUS_SUCCESS);
|
KmtEndSeh(STATUS_SUCCESS);
|
||||||
|
|
||||||
|
@ -253,6 +255,11 @@ PerformTest(
|
||||||
{
|
{
|
||||||
PKTHREAD ThreadHandle;
|
PKTHREAD ThreadHandle;
|
||||||
|
|
||||||
|
TestContext->Length = FileSizes.FileSize.QuadPart - Offset.QuadPart;
|
||||||
|
ThreadHandle = KmtStartThread(MapInAnotherThread, TestContext);
|
||||||
|
KmtFinishThread(ThreadHandle, NULL);
|
||||||
|
|
||||||
|
TestContext->Length = FileSizes.FileSize.QuadPart - 2 * Offset.QuadPart;
|
||||||
ThreadHandle = KmtStartThread(MapInAnotherThread, TestContext);
|
ThreadHandle = KmtStartThread(MapInAnotherThread, TestContext);
|
||||||
KmtFinishThread(ThreadHandle, NULL);
|
KmtFinishThread(ThreadHandle, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue