mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
[KMTESTS:CC] Add tests for PIN_IF_BCB flag
This commit is contained in:
parent
6937fa8f41
commit
a4dc3c4963
1 changed files with 23 additions and 0 deletions
|
@ -178,6 +178,18 @@ PinInAnotherThread(IN PVOID Context)
|
|||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, TestContext->Length, PIN_WAIT | PIN_IF_BCB, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
||||
if (!skip(Ret == TRUE, "CcPinRead failed\n"))
|
||||
{
|
||||
ok_eq_pointer(Bcb, TestContext->Bcb);
|
||||
ok_eq_pointer(Buffer, TestContext->Buffer);
|
||||
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -242,6 +254,17 @@ PerformTest(
|
|||
{
|
||||
Ret = FALSE;
|
||||
Offset.QuadPart = 0x1000;
|
||||
|
||||
/* Try enforce BCB first */
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_WAIT | PIN_IF_BCB, &Bcb, (PVOID *)&Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
ok(Ret == FALSE, "CcPinRead succeed\n");
|
||||
if (Ret)
|
||||
{
|
||||
CcUnpinData(Bcb);
|
||||
}
|
||||
|
||||
KmtStartSeh();
|
||||
Ret = CcPinRead(TestFileObject, &Offset, FileSizes.FileSize.QuadPart - Offset.QuadPart, PIN_WAIT, &TestContext->Bcb, &TestContext->Buffer);
|
||||
KmtEndSeh(STATUS_SUCCESS);
|
||||
|
|
Loading…
Reference in a new issue