mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:46:13 +00:00
[KMTESTS:CC] Add more tests for CcPinMappedData()
This commit is contained in:
parent
e3531499c2
commit
ce0650d37d
2 changed files with 31 additions and 1 deletions
|
@ -353,6 +353,36 @@ PerformTest(
|
||||||
ExFreePool(TestContext);
|
ExFreePool(TestContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (TestId == 3)
|
||||||
|
{
|
||||||
|
Ret = FALSE;
|
||||||
|
Offset.QuadPart = 0;
|
||||||
|
KmtStartSeh();
|
||||||
|
Ret = CcMapData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, MAP_WAIT, &Bcb, (PVOID *)&Buffer);
|
||||||
|
KmtEndSeh(STATUS_SUCCESS);
|
||||||
|
|
||||||
|
if (!skip(Ret == TRUE, "CcMapData failed\n"))
|
||||||
|
{
|
||||||
|
Ret = FALSE;
|
||||||
|
PinBcb = Bcb;
|
||||||
|
ok_eq_ulong(Buffer[0x3000 / sizeof(ULONG)], 0xDEADBABE);
|
||||||
|
|
||||||
|
KmtStartSeh();
|
||||||
|
Ret = CcPinMappedData(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_IF_BCB, &PinBcb);
|
||||||
|
KmtEndSeh(STATUS_SUCCESS);
|
||||||
|
|
||||||
|
if (!skip(Ret == FALSE, "CcPinMappedData succeed\n"))
|
||||||
|
{
|
||||||
|
ok_eq_pointer(Bcb, PinBcb);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Bcb = PinBcb;
|
||||||
|
}
|
||||||
|
|
||||||
|
CcUnpinData(Bcb);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ START_TEST(CcPinMappedData)
|
||||||
KmtOpenDriver();
|
KmtOpenDriver();
|
||||||
|
|
||||||
/* 1 basic test */
|
/* 1 basic test */
|
||||||
for (TestId = 0; TestId < 3; ++TestId)
|
for (TestId = 0; TestId < 4; ++TestId)
|
||||||
{
|
{
|
||||||
Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId);
|
Ret = KmtSendUlongToDriver(IOCTL_START_TEST, TestId);
|
||||||
ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
|
ok(Ret == ERROR_SUCCESS, "KmtSendUlongToDriver failed: %lx\n", Ret);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue